What You Will Need
- A Siemens S7-1200 or S7-1500 PLC with firmware 4.0+
- TIA Portal for initial PLC configuration
- A Node.js server (the OPC-UA client)
- A React.js or plain HTML frontend
Step 1: Enable OPC-UA on the PLC
In TIA Portal, open your PLC properties → General → OPC UA → enable the server. Set the port to 4840 (default). Create a Data Block with the variables you want to expose. Mark each variable as OPC-UA accessible.
Step 2: Set Up the Node.js OPC-UA Client
Install the node-opcua package: npm install node-opcua. Connect to the PLC and subscribe to value changes. Every time the PLC updates a variable, your server receives the new value in under 100ms.
Step 3: Push Data to the Browser
Use a WebSocket (socket.io or native WS) to forward OPC-UA data to your frontend in real time. The browser subscribes to the WebSocket and updates the dashboard without any polling.
OPC-UA + Node.js + WebSocket is the most reliable, vendor-neutral stack for connecting any modern PLC to a web dashboard. The entire setup takes 2–3 days for a developer familiar with Node.js.
Need Help With This?
Need PLC integration for your factory? We build production-ready OPC-UA dashboards.
Talk to Our Team →