In this section, we'll define one PLC that supports Modbus TCP protocol.


1. Select Data Sources, and Click on the Add button.



2. In Data Source Editor, enter the following:

  • Data Source Name: PLC1
  • Data Source Type: Modbus TCP



3. Enter the following details:

  • IP Address: 127.0.0.1 (If you have a Modbus TCP simulator on your machine otherwise enter your PLC IP address).
  • Swapped Floats: Required in some cases to have correct floating variable values.



4. Define the specific Modbus ranges need be scanned during runtime. In Ranges tab, enter the following:

  • Read Holding Registers, Start = 1, Count = 10 (We'll use this range for Integer tags)
  • Read Holding Floats, Start = 10, Count = 10 (We'll use this range for Real tags)
  • Read Coils, Start = 1, Count = 20 (We'll use this range for Boolean tags)