APPLICABLE PRODUCTS
- ABC3028
- ABC3128
- ABC4011
- ABC4016
- ABC4017
- ABC4018
PRE-REQUISITES
- A Modbus TCP Client
- Anybus Communicator with a Modbus TCP server interface
- HMS IPConfig
QUESTION
What is the default addressing mode in the Anybus Communicator - Modbus TCP server, and how to use the "Anybus Address Mode"?
ANSWER
Modbus Address Mode
By default, the mode used for addressing in the Anybus Communicator is the Modbus Address Mode. This is the mode that is active by default when you don't enable the "Anybus Address Mode".
In this mode, you can use function code 3 (Read Holding Registers) and function code 4 (Read Input Registers) to read data from the communicator and function code 6 (Write Single Register), function code 16 (Force Multiple Registers) and function code 22 (Mask Write Register) to write data to the communicator.
Reading the first address on the Modbus TCP side with function code 4 (Read Input Register) gives you access to the data written on the first address by the secondary network.
However, to have access to the same data using function code 3 (Read Holding Register), you have to add an offset of 2048.
If you try reading that data with function code 3 (Read Holding Register) starting from address 0 to 749, you will just read back what has been written to the communicator.
Anybus Address Mode
This alternative addressing mode can be enabled under the Advanced settings tab on the communicators web interface.
In this mode, you have access to more function codes for reading data, function code 1 (Read Coil), function code 2 (Read Input Discretes), function code 3 (Read Holding Registers), function code 4 (Read Input Registers) as well as for writing data, function code 5 (Write Coil), function code 6 (Write Single Register), function code 15 (Force Multiple Coils), function code16 (Force Multiple Registers), function code 22 (Mask Write Register), function code 23 (Read/Write Registers).
One of the main advantages of this mode is that when you get some data from the secondary network, you can access it on the Modbus TCP side using both function code 3 (Read Holding Registers) and function code 4 (Read Input Registers) on the same addresses, without any offsets.
On the other hand, in this mode, if you want to write some data to the secondary network from the Modbus TCP side, you have to add a register offset of 1024, as shown on the example below.