Connect to a Modbus Device Tutorial
Connect to a Modbus Device and addresses to tags.
Tutorials → Devices | Tutorial | How-to Guide | Reference
1. Create Device Channel
- Navigate to Devices → Protocols
- Select Modbus
- Click on New channel:
- Channel Name:
ModbusChannel - Protocol:
Modbus Master Protocol - Interface: TCP/IP
- Channel Name:
2. Add Device Node
- Go to Devices → Nodes
- Create node:
- Name:
PLC1 - Channel:
ModbusChannel - Station: IP Address (use 127.0.0.1 for simulator)
- Port 502
- Device ID: 1
- Name:
3. Create Device Points
- Navigate to Devices → Points
- Add points:
Digital Input:
- Tag Name:
TankFarm/Tank1/Level - Node:
PLC1 - Address:
40001 - Data Type: Native
- AccessType: ReadWrite
Analog Input:
- Name:
TankFarm/Tank2/Level - Node:
PLC1 - Address:
40002 - Data Type: Native
- AccessType: ReadWrite
4. Starting Modbus Device Simulator
- Devices → Channels
- Select ModbusChannel
- Run Modbus Simulator
5. Test Communication
- Start Runtime
- Open Devices → Monitor
- Check status (if the ActivityCounter is increasing and LastErrorCode stays fixed, it means everything is running properly)