Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 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 A-Stack 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

...

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 Write:

...

languagexml
titleOpcua Write Facet
linenumberstrue

...

, 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 Write:

    Code Block
    languagexml
    titleOpcua Write Facet
    linenumberstrue
    <ThingFacet Name="OPCWriteFacet">
      <String KnownBy="OPCWriteAction" Name="OpcData"/>
      <String Name="NodeID"/>
      <Integer Name="AttribueID"/>
      <ConnectionConfig Name="OPCSubscribeConnectionConfig"/>
      <Action Name="OPCWriteAction">
        <Workflow Limit="1" Live="1" Timeout="-1">
          <Task name="Main">
            <Event as="ActionArgument" name="Argument"/>
            <Invoke name="InvokeOPCWrite" post="opcua://?ServerUri=[%:Event.Argument.OPCSubscribeConnectionConfig.ServerUri.Value:%]&amp;
    			SecurityMode=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityMode.Value:%]&amp;
    			UserName=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.UserName.Value:%]&amp;
    			Password=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.Password.Value:%]&amp;
    			Path=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.Path.Value:%]&amp;
    			ValidityInDay=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.ValidityInDay.Value:%]&amp;
    			AutoCertificateRenewal=
    			[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.AutoCertificateRenewal.Value:%]&amp;
            	PrivateKeyPwd=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.PrivateKeyPwd.Value:%]&amp;
            	OrgName=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.OrgName.Value:%]&amp;
                KeySize=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.KeySize.Value:%]&amp;
                AppUri=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.ApplicationIdentity.AppUri.Value:%]&amp; 
                AppName=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.ApplicationIdentity.AppName.Value:%]&amp;                             
    			ProductUri=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.ApplicationIdentity.ProductUri.Value:%]&amp;
                Operation=[%:Event.Argument.Operation.Value:%]" scope="local" waitFor="Argument">
              <Message>
                <Value>
                  <Payload>
                        [%:Event.Argument.OpcData.Value:%]
                  </Payload>
                  <NodeID>
                      [%:Event.Argument.NodeID.Value:%]
                  </NodeID>
                  <AttributeID>
                      [%:Event.Argument.AttributeID.Value:%]
                <Task name="Main" > </AttributeID>
              <Event as="ActionArgument" name="Argument"/> </Value>
              </Message>
     <Invoke get="opcua://" waitFor="Argument" name="InvokeOPCWrite" Operation="[%:Event.Argument.Operation.Value:%]"   </Invoke>
            <Output As="ActionResult" ServerUriName="[%:Event.Argument.OPCWriteConnectionConfig.ServerUri.Value:%]"Result">
              <Value>
      SecurityMode="[%:Event.Argument.OPCWriteConnectionConfig.SecurityMode.Value:%]"           <OpcData>
      UserName="[%:Event.Argument.OPCWriteConnectionConfig.SecurityOptions.UserName.Value:%]"             Password="[%:Event.Argument.OPCWriteConnectionConfig.SecurityOptions.Password.Value:%]"<Include>
    				Invoke.InvokeOPCWrite.Message.Value
                Path="[%:Event.Argument.OPCWriteConnectionConfig.SecurityOptions.CertificationParameters.Path.Value:%]"  </Include>
                ValidityInDay="[%:Event.Argument.OPCWriteConnectionConfig.SecurityOptions.CertificationParameters.ValidityInDay.Value:%]"</OpcData>
                AutoCertificateRenewal="[%:Event.Argument.OPCWriteConnectionConfig.SecurityOptions.CertificationParameters.AutoCertificateRenewal.Value:%]"</Value>
            </Output>
         PrivateKeyPwd="[%:Event.Argument.OPCWriteConnectionConfig.SecurityOptions.CertificationParameters.PrivateKeyPwd.Value:%]"
     </Task>
        </Workflow>
      </Action>
       OrgName="[%:Event.Argument.OPCWriteConnectionConfig.SecurityOptions.CertificationParameters.OrgName.Value:%]"</ThingFacet>
    Code Block
    languagexml
    titlewrite Initialization Query
    linenumberstrue
    <Query>
      <DeleteAll>
        <OPCWriteModel>
          <writeId KeySize="[%:Event.Argument.OPCWriteConnectionConfig.SecurityOptions.CertificationParameters.KeySize.Value:%]"
      ne=""/>
        </OPCWriteModel>
      </DeleteAll>
      <Create>
        <OPCWriteModel>
        AppUri="[%:Event.Argument.OPCWriteConnectionConfig.SecurityOptions.ApplicationIdentity.AppUri.Value:%]"  <Operation>
            write
     AppName="[%:Event.Argument.OPCWriteConnectionConfig.SecurityOptions.ApplicationIdentity.AppName.Value:%]"     </Operation>
           ProductUri="[%:Event.Argument.OPCWriteConnectionConfig.SecurityOptions.ApplicationIdentity.ProductUri.Value:%]"<NodeID>
    		Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank1.Tank_1_FCU_Temperature
             </NodeID>
      NodeID="[%:Event.Argument.NodeID.Value:%]"    <AttributeID>
            AttributeID="[%:Event.Argument.AttributeID.Value:%]">$Null()
          </AttributeID>
         <Message> <OPCSubscribeConnectionConfig>
            <ServerUri>
        <Value>       opc.tcp://MSEDGEWIN10:49320
             "[%:Event.Argument.opcData.Value:%]"   </ServerUri>
            <SecurityMode>
      </Value>        2
        </Message>    </SecurityMode>
          </Invoke>  <SecurityOptions>
            <Output As="ActionResult" Name="Result"> <UserName/>
              <Password/>
       <Value>       <ApplicationIdentity>
           <OpcData>[%:Invoke.InvokeOPCWrite.Message.Value:%]</OpcData>     <AppName>
           </Value>       atomitonClient@localhost
       </Output>         </Task>AppName>
          </Workflow>     </Action>   </ThingFacet>
    Code Block
    languagexml
    titlewrite Initialization Query
    linenumberstrue
    <Query><AppUri>
             <DeleteAll>     <OPCWriteModel>urn:localhost:OPCUATQL
          <writeId ne=""/>     </OPCWriteModel>AppUri>
             </DeleteAll>   <Create><ProductUri>
        <OPCWriteModel>       <Operation>   urn:atomiton.com:OPCUA
         Write       </Operation>ProductUri>
          <OPCWriteConnectionConfig>     </ApplicationIdentity>
       <ServerUri>       <CertificationParameters>
       opc.tcp://ServerURL:ServerPort         </ServerUri> <OrgName>
           <SecurityMode>       atomiton
       2         </SecurityMode>OrgName>
             <SecurityOptions>   <Path>
           <UserName/>       /atomiton/certs
       <Password/>         </Path>
     <ApplicationIdentity>           <PrivateKeyPwd>
     <AppName>               atomitonClient@localhosttql123#
                </AppName>PrivateKeyPwd>
                <AppUri><ValidityInDay>
                  urn:localhost:OPCUATQL3650
                </AppUri>ValidityInDay>
                <ProductUri><AutoCertificateRenewal>
                  urn:atomiton.com:OPCUAtrue
                </ProductUri>AutoCertificateRenewal>
              </ApplicationIdentity>  <KeySize>
            <CertificationParameters>      2048
          <OrgName>      </KeySize>
            atomiton  </CertificationParameters>
            </SecurityOptions>
     </OrgName>     </OPCSubscribeConnectionConfig>
          <OpcData>
    <Path>        50
          </atomiton/certsOpcData>
        </OPCWriteModel>
        </Create>
    </Query>
    Code Block
    languagexml
    titleWrite Update query
    linenumberstrue
    <Query>
      </Path>
    <Find format="version,known">
        <OPCWriteModel>
          <PrivateKeyPwd>
    <writeId ne=""/>
        </OPCWriteModel>
      </Find>
      <if condition="$Response.Message.Value/Find/Status eq 123lk#'Success'">
        <then>
          <SetResponseData>
    </PrivateKeyPwd>        <key>
        <ValidityInDay>      Message.Value.Find.Result.OPCWriteModel.OpcData.Value
            3650
    </key>
               </ValidityInDay>  <value>
              <AutoCertificateRenewal>200
            </value>
         true </SetResponseData>
          <Update>
         </AutoCertificateRenewal>   <from>
             <KeySize> Result
            </from>
        2048    <Include>
            </KeySize>  $Response.Message.Value.Find
            </CertificationParameters>Include>
          </Update>
     </SecurityOptions>   </then>
      </if>
    </OPCWriteConnectionConfig>Query>
  • Opcua Subscription:

    Code Block
    languagexml
    titleOpcua Subscription Facet
    linenumberstrue
    	<Def Name="CertificationParams">
          <NodeID>
    <String Name="OrgName"/>
          <String ns=2;s=Atomiton.OilAndGas.Device1.TankData.USSAV1S01HST.Tank1.Tank_1_FCU_TemperatureName="Path"/>
          <String </NodeID>Name="PrivateKeyPwd"/>
           <AttributeID><String Name="ValidityInDay"/>
          <String Name="AutoCertificateRenewal"/>
    13      <Integer </AttributeID>Name="KeySize"/>
        </Def>
     <OpcData>         1024
     <Def Name="AppIdentity">
        </OpcData>     </OPCWriteModel><String Name="AppName"/>
      </Create> </Query>
    Code Block
    languagexml
    titleWrite Update query
    linenumberstrue
    <Query>   <Find<String formatName="version,knownAppUri"/>
        <OPCWriteModel>       <writeId ne<String Name="ProductUri"/>
        </OPCWriteModel>Def>
      </Find>  <Def <if condition="$Response.Message.Value/Find/Status eq 'Success'">
        <then>Name="SecurityConfig">
          <String Name="UserName"/>
    <SetResponseData>      <String Name="Password"/>
     <key>     <AppIdentity Name="ApplicationIdentity"/>
        Message.Value.Find.Result.OPCWriteModel.OpcData.Value  <CertificationParams Name="CertificationParameters"/>
         </key>Def>
        <Def Name="ConnectionConfig">
       <value>   <String Name="ServerUri"/>
          200
    <Integer Name="SecurityMode"/>
          <SecurityConfig </value>
     Name="SecurityOptions"/>
        </SetResponseData>Def>
        <Def Name="OPCUaSubscribe">
    <Update>      <String Cardinality="0..m" Name="NodeID"/>
    <from>      <String Name="AttributeID"/>
       Result   <String Name="SubscribeChild"/>
        </from>  <String Name="SamplingRate"/>
        </Def>
    <Include>
    
    	<ThingFacet Name="OPCSubscriberFacet">
           $Response.Message.Value.Find
            </Include>
          </Update>
        </then>
      </if>
    </Query>

    Opcua Subscription:

    Code Block
    languagexml
    titleOpcua Subscription Facet
    linenumberstrue
    	<Def Name="CertificationParams		<String Format="$ObjectFormat(xml)" KnownBy="OPCSubscriberAction" Name="SubscriptionData" update="auto"/>
      		<String Name="Operation"/>
      		<ConnectionConfig Name="OPCSubscribeConnectionConfig"/>
      		<OPCUaSubscribe Name="OPCSubscriptionConfig"/>
      		<Action Name="OPCSubscriberAction">
        	<Workflow Limit="1"   <String NameLive="1" Timeout="OrgName-1"/>
          		<Task  <String Namename="Main" while="Pathtrue"/>
            <String Name		<Event as="ActionArgument" name="PrivateKeyPwdArgument"/>
            <String Name="ValidityInDay"/>			<Invoke name="InvokeOPCSubscription" post="opcua://?ServerUri=[%:Event.Argument.OPCSubscribeConnectionConfig.ServerUri.Value:%]&amp;
            <String Name="AutoCertificateRenewal"/>         <Integer Name="KeySize"/>    SecurityMode=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityMode.Value:%]&amp;
                 </Def>        UserName=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.UserName.Value:%]&amp;
     <Def Name="AppIdentity">
            <String Name="AppName"/>					 Password=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.Password.Value:%]&amp;
    					 Path=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.Path.Value:%]&amp;
            <String			 Name="AppUri"/>
            <String Name="ProductUri"/>
        </Def>ValidityInDay=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.ValidityInDay.Value:%]&amp;
    					 AutoCertificateRenewal=	 
    						[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.AutoCertificateRenewal.Value:%]&amp;
            <Def			 Name="SecurityConfig">
            <String Name="UserName"/>PrivateKeyPwd=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.PrivateKeyPwd.Value:%]&amp;
            <String			 Name="Password"/>OrgName=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.OrgName.Value:%]&amp;
             <AppIdentity Name="ApplicationIdentity"/>          <CertificationParams Name="CertificationParameters"/>       
    KeySize=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.KeySize.Value:%]&amp;
       </Def>          <Def Name="ConnectionConfig">         <String Name="ServerUri"/>AppUri=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.ApplicationIdentity.AppUri.Value:%]&amp;
              <Integer Name="SecurityMode"/>           <SecurityConfig Name="SecurityOptions"/>  AppName=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.ApplicationIdentity.AppName.Value:%]&amp;
    					 ProductUri=[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.ApplicationIdentity.ProductUri.Value:%]&amp;
           </Def>      <Def Name="OPCUaSubscribe">       <String Name="NodeID" Cardinality="0..m"/>
          <String Name="AttributeID"/>
          <String Name="SubscribeChild"/>Operation=[%:Event.Argument.Operation.Value:%]" scope="process" waitFor="Argument">
            </Def>   			 <Message>
       <ThingFacet Name="OPCSubscriberFacet">       <String Format="$ObjectFormat(xml)" Name="SubscriptionPayload" KnownBy="OPCSubscriberAction" update="auto"/> 			<Value>
             <String Name="Operation"/>    				<OPCSubscriptionConfig>
      <ConnectionConfig Name="OPCSubscribeConnectionConfig"/>       <OPCUaSubscribe Name="OPCSubscriptionConfig"/>       <Action Name="OPCSubscriberAction">				[:Event.Argument.OPCSubscriptionConfig:]
             <Workflow Limit="1" Live="1" Timeout="-1">  				</OPCSubscriptionConfig>
            <Task name="Main" while="true">  		  	</Value>
            <Event as="ActionArgument" name="Argument"/> 			</Message>
            		    <Invoke AppName="[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.ApplicationIdentity.AppName.Value:%]" 
    AppUri="[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.ApplicationIdentity.AppUri.Value:%]" 
    AutoCertificateRenewal="[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.AutoCertificateRenewal.Value:%]" 
    KeySize="[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.KeySize.Value:%]" 
    OPCSubscriptionConfig="[%:Event.Argument.OPCSubscriptionConfig:%]" 
    Operation="[%:Event.Argument.Operation.Value:%]" 
    OrgName="[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.OrgName.Value:%]" 
    Password="[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.Password.Value:%]" 
    Path="[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.Path.Value:%]" 
    PrivateKeyPwd="[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.PrivateKeyPwd.Value:%]" 
    ProductUri="[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.ApplicationIdentity.ProductUri.Value:%]" 
    SecurityMode="[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityMode.Value:%]" 
    ServerUri="[%:Event.Argument.OPCSubscribeConnectionConfig.ServerUri.Value:%]"
    UserName="[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.UserName.Value:%]" 
    ValidityInDay="[%:Event.Argument.OPCSubscribeConnectionConfig.SecurityOptions.CertificationParameters.ValidityInDay.Value:%]" 
    get="opcua://Subscribe" name="InvokeOPCSubscription" scope="process" waitFor="Argument"/>
      </Invoke>
            		   <Output As="ActionResult" Name="Result">
              			<Value>
                			<SubscriptionData>
                  				<Include>
                      				Invoke.InvokeOPCSubscription.Message.Value
                  				</Include>
                			</SubscriptionData>
             <Output As="ActionResult" Name="Result"> 			</Value>
            		   </Output>
       <Value>   		</Task>
        	</Workflow>
     	 </Action>
    	</ThingFacet>
    Code Block
    languagexml
    titleSubscription Initialization Query
    linenumberstrue
    <Query>
      <DeleteAll>
     <SubscriptionPayload>   <OPCSubscriberModel>
          <subscribeId ne=""/>
        </OPCSubscriberModel>
      <Include>Invoke.InvokeOPCSubscription.Message.Value</Include></DeleteAll>
      <Create>
        <OPCSubscriberModel>
          <Operation>
     </SubscriptionPayload>        subscription
          </Value>Operation>
          <OPCSubscribeConnectionConfig>
            </Output><ServerUri>
              </Task>opc.tcp://MSEDGEWIN10:49320
            </Workflow>ServerUri>
          </Action>  <SecurityMode>
      </ThingFacet>

    Note: The output is stored in the variable SubscriptionPayload although the Known By is on the variable SubscriptionData, this has been done to preserve the Xml structure and avoid TP processing. 

    Code Block
    languagexml
    titleSubscription Initialization Query
    linenumberstrue
    <Query>    <DeleteAll>    2
    <OPCSubscriberModel>       <subscribeId ne=""/></SecurityMode>
        </OPCSubscriberModel>   </DeleteAll> <SecurityOptions>
     <Create>     <OPCSubscriberModel>    <UserName/>
      <Operation>        <Password/>
    subscription       </Operation>   <ApplicationIdentity>
       <OPCSubscribeConnectionConfig>         <ServerUri><AppName>
              opc.tcp://Server:ServerPort    atomitonClient@localhost
        </ServerUri>        </AppName>
    <SecurityMode>           2 <AppUri>
           </SecurityMode>       urn:localhost:OPCUATQL
     <SecurityOptions>           <UserName</>AppUri>
              <Password/>  <ProductUri>
            <ApplicationIdentity>      urn:atomiton.com:OPCUA
          <AppName>      </ProductUri>
            atomitonClient@localhost  </ApplicationIdentity>
              </AppName><CertificationParameters>
                <AppUri><OrgName>
                  urn:localhost:OPCUATQLatomiton
                </AppUri>OrgName>
                <ProductUri><Path>
                  urn:atomiton.com:OPCUA/atomiton/certs
                </ProductUri>Path>
                <PrivateKeyPwd>
      </ApplicationIdentity>            <CertificationParameters>tql123#
                <OrgName></PrivateKeyPwd>
                <ValidityInDay>
     atomiton             </OrgName>3650
                <Path>/atomiton/certs</Path></ValidityInDay>
                <PrivateKeyPwd><AutoCertificateRenewal>
                  tql123#true
                </PrivateKeyPwd>AutoCertificateRenewal>
                <ValidityInDay><KeySize>
                  36502048
                </ValidityInDay>KeySize>
              </CertificationParameters>
     <AutoCertificateRenewal>       </SecurityOptions>
          </OPCSubscribeConnectionConfig>
    true      <OPCSubscriptionConfig>
          </AutoCertificateRenewal>  <NodeID>
              <KeySize>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank1
            </NodeID>
         2048   <NodeID>
             </KeySize>
     ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank2
             </CertificationParameters>NodeID>
            <<AttributeID/SecurityOptions>>
          </OPCSubscribeConnectionConfig>  <SamplingRate>
        <OPCSubscriptionConfig>       1000
     <NodeID>           ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank1</SamplingRate>
            </NodeID>
     <SubscribeChild>
          <AttributeID/>    true
        <SubscribeChild>    </SubscribeChild>
          true</OPCSubscriptionConfig>
          <SubscriptionData>
     </SubscribeChild>       </OPCSubscriptionConfig>$Null()
          <SubscriptionPayload>$Null()</SubscriptionPayload>SubscriptionData>
        </OPCSubscriberModel>
      </Create>
    </Query>
    
    
    
    Code Block
    languagexml
    titleSubscription Deletion Query
    linenumberstrue
    <Query>
      <DeleteAll>
        <OPCSubscriberModel>
          <subscribeId ne=""/>
        </OPCSubscriberModel>
      </DeleteAll>
    </Query>
  • Note: It is possible to subscribe to multiple root nodes using a single facet, separate the NodeIDuse multiple Node ID's with ;; delimiter in subscription initialization query as shown belowas shown in above subscription query

    Code Block
    languagexml
    titleMultiple topics subscription
    linenumberstrue
    		 <NodeID>
              	ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank1;;
            </NodeID>
            <NodeID>
              	ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank1Tank2
            </NodeID>

     

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


Code Block
languagexml
titleXml Output Format
linenumberstrue
  <SubscriptionPayload<SubscriptionData VersionValue="2">
    Version="1">
    <Value><Known>
        <OpcUaNodes>
 <OpcUaNodes>           <OpcUaNode>
 <OpcUaNode>               <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.USSAV1S01HSTTest.Tank1.Tank_1_Agitator_Motor_Running_Bit</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08  <SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.USSAV1S01HSTTest.Tank1.Tank_1_FCU_Temperature</NodeID>
              <NodeValue>201  <NodeValue>999.0</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>08<SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Float</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.USSAV1S01HSTTest.Tank1.Tank_1_Gallon_Value</NodeID>
                <NodeValue>1.34646997E15<34547004E15</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>08<SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Double</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.USSAV1S01HSTTest.Tank1.Tank_1_Loading_PP_Motor_Running_Bit</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08  <SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.USSAV1S01HSTTest.Tank1.Tank_1_RAW_Level_Inches</NodeID>
              <NodeValue>568  <NodeValue>500.0</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>08<SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Double</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.USSAV1S01HSTTest.Tank1.Tank_1_steaming_in_auto_selected_HMI</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08  <SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.USSAV1S01HSTTest.Tank1.Tank_1_unld_PP_Motor_Running_Bit</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
               <SourceTimeStamp>08 <SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
 
        </OpcUaNodes>         </Value>
        <Known>
          <OpcUaNodes>
            <OpcUaNode><OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.TestVopak.Device1.TankData.USSAV1S01HST.Tank1Tank2.Tank_12_Agitator_Motor_Running_Bit</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08  <SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.TestVopak.Device1.TankData.USSAV1S01HST.Tank1Tank2.Tank_12_FCU_Temperature</NodeID>
              <NodeValue>201  <NodeValue>56.0</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>08<SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Float</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=AtomitonVopak.OilAndGas.Test.Device1.TankData.USSAV1S01HST.Tank1Tank2.Tank_12_Gallon_Value</NodeID>
                <NodeValue>1.34646997E15<34547004E15</NodeValue>
                <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08  <SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Double</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.TestVopak.Device1.TankData.USSAV1S01HST.Tank1Tank2.Tank_12_Loading_PP_Motor_Running_Bit</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>08<SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.TestVopak.Device1.TankData.USSAV1S01HST.Tank1Tank2.Tank_12_RAW_Level_Inches</NodeID>
                <NodeValue>568<NodeValue>34.0<6</NodeValue>
                <StatusCode>GOOD</StatusCode>
              <SourceTimeStamp>08  <SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Double</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.TestVopak.Device1.TankData.USSAV1S01HST.Tank1Tank2.Tank_12_steaming_in_auto_selected_HMI</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>08<SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.TestVopak.Device1.TankData.USSAV1S01HST.Tank1Tank2.Tank_12_unld_PP_Motor_Running_Bit</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>08<SourceTimeStamp>03/1007/1617 0019:3853:2739.08239508876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
          </OpcUaNodes>
   
    </Known>

     </SubscriptionPayload>SubscriptionData>