TQL Engine supports OPC-UA protocol Handler, that can be used to subscribe/update various nodes present on OPC-UA server.


 OPCUA Protocol Handler Flow:

OPCUA Protocol Handler Installation: Download the protocol handlers zip file from the link below

http://sandbox.atomiton.com:8080/fid-downloads/res/downloads/protocolhandlers.zip

once downloaded unzip it.  After you unzip it go to protocolhandlers/Opcua directory and copy the sff.bundle.ext.opc.jar from this location to the sff.auto.launch folder which is present in your TQL engine folder.

OPCUA Protocol Parameters:

The table below lists all the parameters of opcua protocol handler and their description

Parameter Name

Parameter Description

ConnectionConfig

A def containing all the information about connection and security parameters of OPCUA server, it has the following fields ServerUri, SecurityConfig and SecurityMode (0-6).

Security Mode             Description

0                                                  None

1                                                  128-bit RSA Sign

2                                                  128-bit RSA Sign and encrypt

3                                                  256-bit Basic Sign

4                                                  256-bit Basic Sign and encrypt

5                                                  256-bit SHA Sign

6                                                  256-bit SHA Sign and encrypt 

SecurityConfig

A def containing information about security parameters of the server, it has the following fields UserName, Password, ApplicationIdentity and CertificationParameters.

ApplicationIdentity

A def Containing information about the client’s Idenitiy, it has following fields AppName, AppUri and ProductUri.

CertificationParameters

A def containing information about the connection’s certificate parameters, it has following parameters     OrgName, Path, PrivateKeyPwd, ValidityInDay, AutoCertificateRenewal and KeySize.

Operation

This field specifies the operation to be performed, the operation are subscription and write.

NodeID

This parameter is used in case of write Operation, the Node ID on which the write operation is to be performed.

AttributeID

This parameter is used in case of write Operation, the Attribute ID of the respective Node ID on  which the write operation is to be performed.

OpcData

This parameter is used in case of write Operation, and this specifies the write value.

OPCUaSubscribe

A def specific to subscribe operation, It has fields like      NodeID: the Node Id to which we need to subscribe.

AttributeID: attribute ID is optional for subscription.

SubscribeChild: Whether you want to subscribe to child nodes also.


Usage of opcua protocol handler:

Opcua Subscription Message Output Format: The output message of opcua subscription is an xml structure that has array of opcua nodes as shown below.


  <SubscriptionPayload Version="2">
        <Value>
          <OpcUaNodes>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_Agitator_Motor_Running_Bit</NodeID>
              <NodeValue>false</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_FCU_Temperature</NodeID>
              <NodeValue>201.0</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Float</DataType>
            </OpcUaNode>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_Gallon_Value</NodeID>
              <NodeValue>1.34646997E15</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Double</DataType>
            </OpcUaNode>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_Loading_PP_Motor_Running_Bit</NodeID>
              <NodeValue>false</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_RAW_Level_Inches</NodeID>
              <NodeValue>568.0</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Double</DataType>
            </OpcUaNode>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_steaming_in_auto_selected_HMI</NodeID>
              <NodeValue>false</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_unld_PP_Motor_Running_Bit</NodeID>
              <NodeValue>false</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Boolean</DataType>
            </OpcUaNode>
          </OpcUaNodes>
        </Value>
        <Known>
          <OpcUaNodes>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_Agitator_Motor_Running_Bit</NodeID>
              <NodeValue>false</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_FCU_Temperature</NodeID>
              <NodeValue>201.0</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Float</DataType>
            </OpcUaNode>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_Gallon_Value</NodeID>
              <NodeValue>1.34646997E15</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Double</DataType>
            </OpcUaNode>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_Loading_PP_Motor_Running_Bit</NodeID>
              <NodeValue>false</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_RAW_Level_Inches</NodeID>
              <NodeValue>568.0</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Double</DataType>
            </OpcUaNode>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_steaming_in_auto_selected_HMI</NodeID>
              <NodeValue>false</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
              <ServerTimeStamp/>
              <NodeID>ns=2;s=Vopak.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_unld_PP_Motor_Running_Bit</NodeID>
              <NodeValue>false</NodeValue>
              <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08/10/16 00:38:27.0823950 GMT</SourceTimeStamp>
              <DataType>Boolean</DataType>
            </OpcUaNode>
          </OpcUaNodes>
        </Known>
      </SubscriptionPayload>