Connect to a Modbus device and map register addresses to tags.
Home → Tutorials → Industrial Operations Tutorial → Devices Module Tutorial → Connect to a Modbus Device Tutorial
ModbusChannelModbusTCP/IPPLC1ModbusChannel127.0.0.1;502;1 (semicolon-separated IP;Port;SlaveID — 502 is the standard Modbus TCP port, 1 is the unit/slave ID)Modbus addresses are composed as an operand prefix + a 5-digit zero-padded address. The operand selects the register family:
0xxxxx — Coil (read/write bit)1xxxxx — Discrete Input (read-only bit)3xxxxx — Input Register (read-only 16-bit)4xxxxx — Holding Register (read/write 16-bit)Holding Register — Tank 1 Level:
TankFarm/Tank1/LevelPLC1400001 (Holding Register #1)NativeReadWriteHolding Register — Tank 2 Level:
TankFarm/Tank2/LevelPLC1400002 (Holding Register #2)NativeReadWriteTip: Native lets the driver pick the data type from the register width. To force a specific type, use the canonical enum values (Real, Single, Bit, etc.) — see the Modbus driver Reference for the full list and for byte/word-order options.
ModbusChannel127.0.0.1:502 by default and emulates a Modbus slave so you can test the loop without hardware.ActivityCounter is increasing and LastErrorCode stays at 0.TankFarm/Tank1/Level and TankFarm/Tank2/Level are receiving non-stale values from the simulator.