Versions Compared

Key

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

...

 OPCUA Protocol Handler Flow:


OPCUA Protocol Handler Installation: 


Date
Download Location
Version
4/11/2018Download1.1.1


OPCUA Setup Instructions

  1. Unzip the downloaded zip file
  2. Copy the sff.bundle.ext.opc.jar from this location to the sff.auto.launch folder which is present in your A-Stack Prime folder.


OPCUA Protocol Parameters:

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

...


Code Block
languagexml
titleXml Output Format
linenumberstrue
  <SubscriptionData Value="" Version="1">
    <Known>
        <OpcUaNodes>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank1.Tank_1_Agitator_Motor_Running_Bit</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank1.Tank_1_FCU_Temperature</NodeID>
                <NodeValue>999.0</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Float</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank1.Tank_1_Gallon_Value</NodeID>
                <NodeValue>1.34547004E15</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Double</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank1.Tank_1_Loading_PP_Motor_Running_Bit</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank1.Tank_1_RAW_Level_Inches</NodeID>
                <NodeValue>500.0</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Double</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank1.Tank_1_steaming_in_auto_selected_HMI</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank1.Tank_1_unld_PP_Motor_Running_Bit</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank2.Tank_2_Agitator_Motor_Running_Bit</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank2.Tank_2_FCU_Temperature</NodeID>
                <NodeValue>56.0</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Float</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank2.Tank_2_Gallon_Value</NodeID>
                <NodeValue>1.34547004E15</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Double</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank2.Tank_2_Loading_PP_Motor_Running_Bit</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank2.Tank_2_RAW_Level_Inches</NodeID>
                <NodeValue>34.6</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Double</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank2.Tank_2_steaming_in_auto_selected_HMI</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
            <OpcUaNode>
                <ServerTimeStamp/>
                <NodeID>ns=2;s=Atomiton.OilAndGas.Test.Device1.TankData.Test.Tank2.Tank_2_unld_PP_Motor_Running_Bit</NodeID>
                <NodeValue>false</NodeValue>
                <StatusCode>GOOD</StatusCode>
                <SourceTimeStamp>03/07/17 19:53:39.8876995 GMT</SourceTimeStamp>
                <DataType>Boolean</DataType>
            </OpcUaNode>
        </OpcUaNodes>
    </Known>
</SubscriptionData>



Kepserver certificate setup steps:

  • Open the Kepserver  Configuration Manager, by right clicking on kepserver icon in the task-bar and then clicking on OPC UA Configuration.Image Added


  • Note down the security mode used by the Kepserver, this is one of the important query parameter.


Image Added


  • When the security mode is not None, the subscription or publish will fail for the first time, with the below message, this is expected behavior as the certificates are not updated in Kepserver.


Code Block
titleOPCUA Error
Caused by: com.prosysopc.ua.client.ServerConnectionException: Server not connected: opc.tcp://MSEDGEWIN10:49320 [http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15,SignAndEncrypt]
              at com.prosysopc.ua.client.UaClient.E(Unknown Source)
              at com.prosysopc.ua.client.AddressSpace.browse(Unknown Source)
              at com.prosysopc.ua.client.AddressSpace.browse(Unknown Source)
              at com.prosysopc.ua.client.AddressSpace.browse(Unknown Source)
              at com.atomiton.sff.imp.netty.opc.client.OPCUaClient.subscribeToAllChildNodes(OPCUaClient.java:237)
              at com.atomiton.sff.imp.netty.opc.OpcHandlerImpl.CreateSubscription(OpcHandlerImpl.java:194)
              at com.atomiton.sff.imp.netty.opc.SffOpcHandler.connect(SffOpcHandler.java:399)
              at com.atomiton.sff.imp.netty.opc.SffOpcHandler.afterAdd(SffOpcHandler.java:103)
              at org.jboss.netty.channel.DefaultChannelPipeline.callAfterAdd(DefaultChannelPipeline.java:342)
              at org.jboss.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:108)
              at com.atomiton.sff.imp.netty.NettyContext.addPipelineHandler(NettyContext.java:4950)
              at com.atomiton.sff.imp.netty.NettyContext.addLast(NettyContext.java:5008)
              at com.atomiton.sff.imp.netty.NettyContext.modifyPipeline(NettyContext.java:4672)
              at com.atomiton.sff.imp.netty.NettyContext.newModifiedPipeline(NettyContext.java:4793)
              at com.atomiton.sff.imp.netty.NettyContext.newInstance(NettyContext.java:4414)
              at com.atomiton.sff.imp.facet.SffWdlFacet.wdlInvokeConnect(SffWdlFacet.java:1226)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at oda.concurrent.imp.MethodSignature.invoke(MethodSignature.java:446)
              at oda.concurrent.dataflow.imp.DfTask.call(DfTask.java:1352)
              at oda.concurrent.dataflow.imp.DfTask.delegate(DfTask.java:1374)
              at com.atomiton.sff.imp.facet.SffWdlFacet.wdlInvoke(SffWdlFacet.java:1103)
              at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at oda.concurrent.imp.MethodSignature.invoke(MethodSignature.java:446)
              at oda.concurrent.dataflow.imp.DfTask.call(DfTask.java:1297)
              at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
              at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
              at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
              at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
              at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)


  • The A-stack will generate the certificate files in the path "PKI/CA/{path provided in the query}" for example when we use above query, the certificates are saved in "PKI/CA/atomiton/certs" folder.

Image Added

  • Copy these certificates on to the machine that is running the Kepserver, and import these certificates in Trusted Clients tab of configuration manager.

Image Added

  • Go to the Run time tab of Kepserver and then reinitialize the server for the new settings to take place.

Image Added

  • Restart the subscription in AStack and it should start working this time.


Troubleshooting:


  1. If we are still getting server not connected error even after certificates are imported and connectivity between the system running AStack and system running Kepserver is validated, then it might be firewall issues, try adding exceptions in firewall and test.