[Example] Use OpcUa Write Node

Questions and Answers

Moderator: IoTStudio Support

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

[Example] Use OpcUa Write 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;i=60001
datatype: UInt16
name: Water Level

The below is IoT Studio Flow for try:

Code: Select all

[{"id":"1d86ba334a36ae8d","type":"OpcUa-Client","z":"0d7ec23baaf03cf6","endpoint":"66b2bc3de338e7d2","action":"write","deadbandtype":"a","deadbandvalue":1,"time":"1","timeUnit":"s","certificate":"n","localfile":"","localkeyfile":"","securitymode":"None","securitypolicy":"None","folderName4PKI":"","name":"","x":1120,"y":400,"wires":[[]]},{"id":"e5b886ec5eb95ff3","type":"OpcUa-Item","z":"0d7ec23baaf03cf6","item":"ns=2;i=60001","datatype":"UInt16","value":"","name":"Water Level","x":950,"y":400,"wires":[["1d86ba334a36ae8d"]]},{"id":"0f54357d8d815639","type":"inject","z":"0d7ec23baaf03cf6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"123","payloadType":"num","x":810,"y":400,"wires":[["e5b886ec5eb95ff3"]]},{"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