Skip to content
Progres Anda0%
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)

  1. Pull the device's register map from the vendor manual.
  2. Map holding registers to human names in config.yaml.
  3. Set poll interval — 1s for status, 60s for slow meters.
  4. Watch for swapped words on 32-bit values; fix scaling before publishing.

Reading Tags (OPC-UA)

  1. Browse the server namespace and copy node IDs.
  2. Subscribe to tags instead of polling where the server supports it.
  3. 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.