[Example] Use OpcUa Subscribe Node

Questions and Answers

Moderator: IoTStudio Support

Post Reply
IoTStudio Support
Posts: 39
Joined: Wed Nov 23, 2022 9:26 am

[Example] Use OpcUa Subscribe Node

Post by IoTStudio Support »

Use AIC OpcUa Extender Server to create a OpcUa Server.
Ex: opc.tcp://AIOTCLOUD-1003:48010
Prepare a model config with the Node.
Ex:
id: ns=2;s=Prot.ModSim32-PLC.PLC.40100.WaterLevel.Water Level
datatype: Float
name: Water Level

The below is IoT Studio Flow for try:

Code: Select all

[{"id":"5985eb2696a3410b","type":"OpcUa-Client","z":"0d7ec23baaf03cf6","endpoint":"66b2bc3de338e7d2","action":"subscribe","deadbandtype":"a","deadbandvalue":1,"time":"1","timeUnit":"s","certificate":"n","localfile":"","localkeyfile":"","securitymode":"None","securitypolicy":"None","folderName4PKI":"","name":"","x":1020,"y":520,"wires":[["ac19091a92828dbf"]]},{"id":"e2bfe085f8030e27","type":"OpcUa-Item","z":"0d7ec23baaf03cf6","item":"ns=2;s=Prot.ModSim32-PLC.PLC.40100.WaterLevel.Water Level","datatype":"Float","value":"","name":"Water Level","x":850,"y":520,"wires":[["5985eb2696a3410b"]]},{"id":"8688e8e049d10637","type":"inject","z":"0d7ec23baaf03cf6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":710,"y":520,"wires":[["e2bfe085f8030e27"]]},{"id":"ac19091a92828dbf","type":"debug","z":"0d7ec23baaf03cf6","name":"debug 40","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1180,"y":520,"wires":[]},{"id":"66b2bc3de338e7d2","type":"OpcUa-Endpoint","endpoint":"opc.tcp://AIOTCLOUD-1003:48010","secpol":"None","secmode":"None","none":true,"login":false,"usercert":false,"usercertificate":"","userprivatekey":""}]
Best Regards,
IoT Studio Support Team
Post Reply