This is a guide for how to configure DIAP for Modbus TCP.
Modbus TCP is used through the RJ45 ethernet plug in the DIAP.
Configure the PLC in the following way:
- In the PLC selection dialog, select Modbus / TCP.
- Select if the system is based on 0 or 1 (if the first register is 0 or 1).
- Specify the IP address.
- Rack - not currently used and can hold any value.
- Port - normally 502 for modbus TCP.
- Slot - the modbus unit ID.
- 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
- 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:
Subsequently, specify the tags.
- Specify Resource type. If this is not provided by the vendor, you can use the table below to translate the direct addresses.
- Datatype depends on the register.
- Register number is the relative address.
|Coils||00001 to 09999|
|Discrete input||10001 to 19999|
|Input register||30001 to 39999|
|Holding register||40001 to 49999|
- 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.