Configuration of DIAP for Modbus TCP

Introduction

This is a guide for how to configure DIAP for Modbus TCP. 

Configuration

Modbus TCP is used through the RJ45 ethernet plug in the DIAP.

Configure the PLC in the following way:

  1. In the PLC selection dialog, select Modbus / TCP.
  2. Select if the system is based on 0 or 1 (if the first register is 0 or 1).
  3. Specify the IP address.
  4. Rack - not currently used and can hold any value.
  5. Port - normally 502 for modbus TCP.
  6. Slot - the modbus unit ID.
  7. PLC registers length - you can choose single word or double word and it alters the way you look at the registers if set to double word it reads 2 16 bits registers as one 32 bit
  8. PLC Register order - you can choose  swapped or regular and it only works if  tag is set to 32-bit. If in swapped the 2 modbus 16 bit register will be swapped.

Example of the settings:

modbus_tcp_ip_setup-1

Subsequently, specify the tags.

  1. Specify Resource type. If this is not provided by the vendor, you can use the table below to translate the direct addresses.
  2. Datatype depends on the register.
  3. Register number is the relative address. 
Resource type Address
Coils 00001 to 09999
Discrete input 10001 to 19999
Input register 30001 to 39999
Holding register 40001 to 49999

 

 

Findings

  • Beckhoff PLC: Customer who has been using 0 based addressing and had a starting address of 32768 were required to use 32776 to access address 8 and 32778 to access address 10 and so on.