Difference between revisions of "TestIT:Configuration Modbus Tcp"

From Nolek Wiki
Jump to navigation Jump to search
Line 1: Line 1:
===Modbus Tcp===
+
===6.3.21 Modbus Tcp===
  
 
A Modbus Tcp device can communicate with a physical Modbus device using the Tcp protocol, making it possible to read from any amount of '''“Holding Registers”''', '''“Discrete Inputs”''', '''“Input Registers”''', and '''“Coils”'''.  
 
A Modbus Tcp device can communicate with a physical Modbus device using the Tcp protocol, making it possible to read from any amount of '''“Holding Registers”''', '''“Discrete Inputs”''', '''“Input Registers”''', and '''“Coils”'''.  

Revision as of 09:35, 10 September 2019

6.3.21 Modbus Tcp

A Modbus Tcp device can communicate with a physical Modbus device using the Tcp protocol, making it possible to read from any amount of “Holding Registers”, “Discrete Inputs”, “Input Registers”, and “Coils”.

It is also possible to write values to the “Holding Registers” and “Coils”.

Setup fields:

  • Device Configuration
  • Symbol Configuration
  • Test Method/Command

Device Configuration:

  1. Write the device name and device description
  2. Select if the device is Active or not
  3. Write the IP Address used to communicate over the Tcp.
  4. Write the Port used for the communication.
  5. Write the amount of Input registers to use
  6. Write the amount of Holding registers to use
  7. Write the amount of Discrete inputs to use
  8. Write the amount of Coils to use
  9. Press Save on the bottom left.

Symbol Configuration:

When an amount of registers, inputs or coils has been entered from the steps above, a tab will appear in the top, for each type with an amount above 0.

Modbus_TCP_Symbol_config.png ‎

In each tab; select a TestIT symbol for the addresses/indexes that you wish to use. The values of these symbols will be sent to the Modbus device, and overwritten if they are read from the Modbus device.

Test Method: Reading and writing to a Modbus, can easily be tested by going to the Test tabs in the top.

  1. To read from one of the types:
    1. Press Lock Config to connect
    2. Press Read All.
  2. To write to the Modbus:
    1. Insert the value you wish to write in each address
    2. Press Lock config
    3. Press Send All

Note 1: Only Holding Registers and Coils can be written to, by Modbus standards.

Note 2: Discrete Inputs and Coils are 1/0 values. If the checkbox [ ] is marked, it means the value is 1.

Coding/Commands:

  • TcpConnect
  • TcpDisconnect
  • TcpRead
  • TcpReadSingle
  • TcpWrite
  • TcpWriteSingle