@jdevoo node-opcua was one of the tools we have used to test the OPC UA driver during development. The results were quite good and we were impressed with how easy it is to develop a custom OPC UA server using javascript.
In my opinion, OPC is way to complex - maybe more than it should be. Modbus is simpler but also very limited. Whenever possible, I choose Modbus over OPC.
I’m attaching to this post a modified version of the official sample server which includes two boolean variables (input/output). Maybe it can serve as a starting point for anyone waiting to explore node-opcua.
Instructions:
- Extract the zip archive and run:
npm install
- run:
node sample_server.js
- Open the included scene (node.js-opcua.factoryio) in FIO and set the correct server url in the OPC Configuration panel (find it in 2).
node-opc-ua-sample-server.zip (62.9 KB)