Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Connect to a Modbus Device (Tutorial) teaches you to:

  • Configure communication channels
  • Add device nodes
  • Map device addresses to tags
  • Monitor communication status

Prerequisites:

On this page:

Table of Contents
maxLevel2
minLevel2
indent10px
excludeSteps
stylenone

  
Devices →  Tutorial | Concept | How-to Guide | Reference


Create Device Channel

  1. Navigate to Devices → Protocols
  2. Select Modbus
  3. Add new Click on New channel:
    • Channel Name: ModbusChannel
    • Protocol: Modbus Master ProtocolSettings:
    • Interface: TCP/IP
    • Port: 502
    • Timeout: 3000ms

Add Device Node

  1. Go to Devices → Nodes
  2. Create node:
    • Name: PLC1
    • Channel: ModbusChannel
    • Station: IP Address (use 127.0.0.1 for simulator)
    • Port 502
    • Device ID: 1

Create Device Points

  1. Navigate to Devices → Points
  2. Add points:

Digital Input:

  • Tag Name: PLC1_DI_001 TankFarm/Tank1/Level
  • Node: PLC1
  • Address: 10001 (Modbus coil) 40001 
  • Data Type: Native
  • AccessType: DigitalReadWrite

Analog Input:

  • Name: PLC1_AI_001 TankFarm/Tank2/Level
  • Node: PLC1
  • Address: 30001 (Modbus input register) 40002 
  • Data Type: IntegerNative
  • Scaling: Enable if needed

Map Devices Points to Tags

  • Go to Unified Namespace → Tags
  • Select existing tag: PLC1_AI_001
  • In Address column: N0001
    • AccessType: ReadWrite



    Starting Modbus Device Simulator

    For testing without real hardware:

    1. Devices → Protocols Channels
    2. Select ModbusChannel
    3. Run Modbus Start SimulatorMonitor values, input values



    Test Communication

    1. Start Runtime (F5)
    2. Open Devices → Monitor
    3. Check status :
      • Green = Connected
      • Red = Error
      • Yellow = Timeout

    Troubleshooting

    IssueCheck
    No connectionFirewall, IP address, port
    Wrong valuesAddress offset, data type
    IntermittentTimeout settings, network
    No updatesPolling rate, scan groups

    Next Steps

  • [Connect to a PLC] - Specific PLC brands
  • [Define Alarms] - Alarm on device values
  • [Historian] - Log device data
    1. (if the ActivityCounter is increasing and LastErrorCode stays fixed, it means everything is running properly)



    In this section...

    Page Tree
    root@parent
    spaces93DRAF