Lanjutan20 menit
Modbus TCP and OPC-UA
Pick the right industrial protocol per asset and read registers and tags without guesswork.
Modbus TCP and OPC-UA
These two protocols cover most PLCs and sensors on a modern floor.
When To Use Each
- Modbus TCP — older PLCs, energy meters, simple sensors. Register-based, deterministic, dumb in a good way.
- OPC-UA — modern PLCs and SCADA. Tag namespaced, typed, with browse support.
Reading Registers (Modbus)
- Pull the device's register map from the vendor manual.
- Map holding registers to human names in config.yaml.
- Set poll interval — 1s for status, 60s for slow meters.
- Watch for swapped words on 32-bit values; fix scaling before publishing.
Reading Tags (OPC-UA)
- Browse the server namespace and copy node IDs.
- Subscribe to tags instead of polling where the server supports it.
- Confirm data types match the source, especially booleans vs integers.
Tips
Never trust the first reading. Validate against the HMI for ten minutes before you trust OpexMX.