Connect to a Modbus Device (Tutorial) teaches you to:
- Configure communication channels
- Add device nodes
- Map device addresses to tags
- Monitor communication status
Prerequisites:
In this page:
Table of Contents maxLevel 2 minLevel 2 indent 10px exclude Steps style none
Create Device Channel
- Navigate to Devices → ChannelsProtocols
- Select Modbus
- Add new channel:
- Name:
ModbusChannel
- Protocol:
Modbus Master
- Settings:
- Interface: TCP/IP
- Port: 502
- Timeout: 3000ms
- Name:
Add Device Node
- Go to Devices → Nodes
- Create node:
- Name:
PLC1
- Channel:
ModbusChannel
- Station: IP Address (use 127.0.0.1 for simulator)
- Device ID: 1
- Name:
Create Device Points
- Navigate to Devices → Points
- Add points:
Digital Input:
- Name:
PLC1_DI_001
- Node:
PLC1
- Address:
10001
(Modbus coil) - Data Type: Digital
Analog Input:
- Name:
PLC1_AI_001
- Node:
PLC1
- Address:
30001
(Modbus input register) - Data Type: Integer
- Scaling: Enable if needed
Map Devices Points to Tags
- Go to Unified Namespace → Tags
- Select existing tag: PLC1_AI_001
- In Address column: N0001
Starting Modbus Device Simulator
For testing without real hardware:
- Devices → Protocols
- Select Modbus
- Start Simulator
- Monitor values, input values
Test Communication
- Start Runtime (F5)
- Open Devices → Monitor
- Check status:
- Green = Connected
- Red = Error
- Yellow = Timeout
Troubleshooting
Issue | Check |
---|---|
No connection | Firewall, IP address, port |
Wrong values | Address offset, data type |
Intermittent | Timeout settings, network |
No updates | Polling rate, scan groups |
Next Steps
- [Connect to a PLC] - Specific PLC brands
- [Define Alarms] - Alarm on device values
- [Historian] - Log device data
In this section...
Page Tree | ||||
---|---|---|---|---|
|