How to Configure RevPi Gate for Modbus TCP Slave

Memory areas

Predefined memory areas are available for addressing the process data. Optionally, you can access the input and output data areas bit by bit (using coils) or word by word.

Register area for word by word access

 

Modbus Address area Use Access Access type Meaning
1 – 256 Input Register Read Only Holding/Input * Values that the other RevPi Gate supplies.
1025 – 1280 Output Register Read/Write Holding Values that are supplied to the other RevPi Gate.
4097/0x1001 Gateway Status Read Only Holding Displays the connection status to the other RevPi Gate.
0x01 Initialisation, checking Hardware.
0x02 Connection to the other gateway component is checked.
0x03 Other gateway component detected.
0x04 Communication to the other gateway component established.
4098/0x1002 Fieldbus status of the other gateway component Read Only Holding 0x00 Fieldbus not connected. Check all Connections.
0x01 Fieldbus connected, no data communication. Check whether an IP address is set.
0x02 Gateway component configured, no data communication.
0x03 Cyclical data Exchange.
4099/0x1003 IP Address Read/Write Holding IP Address High Word
4100/0x1004 IP Address Read/Write Holding IP Address Low Word
4101/0x1005 Network Mask Read/Write Holding Network Mask High Word
4102/0x1006 Network Mask Read/Write Holding Network Mask Low Word
4103/0x1007 Gateway Address Read/Write Holding Gateway Address High Word
4104/0x1008 Gateway Address Read/Write Holding Gateway Address Low Word
4105/0x1009 Max. Number of Modbus/TCP connections Read/Write Holding Shows the maximum number of Modbus/TCP connections that can exist simultaneously.

Value Range: 2-20

4106/0x100a Current number of Modbus/TCP connections Read Only Holding Shows the current number of Modbus/TCP Connections.
4107/0x101b Write Timeout Read/Write Holding The write timeout function is active if there is a value > 0 in this Register.

It specifies the time interval at which at least one of the output registers must be written As soon as the time has elapsed since the last write, all output registers are set to the default value 0.

4108/0x100c Reset Read/Write Holding Restarts the RevPi Gate if 0x4b42 is written here.

 

*Input and holding registers are not distinguished. They can be read via function code 0x04

Register area for bit by bit access

Address area Use Access Access type Meaning
1 – 3840 Input Bits (Coil) Read Only Holding/Input* Values that the other gateway component supplies.
16385 – 20224 Output Bits (Coil) Read/Write Holding Values that are supplied to the other gateway component.

*Input and Holding Register are not differentiated. They can be read using function code 0x004.

Functions

You can access the data area of the gateway component using the following functions:

Function code Use Description Max. size per telegram
0x01 Read data bit by bit read coils 2000 Bit
0x02 read discrete inputs
0x05 Write data bit by bit write single coil 1 Bit
0x0f write multiple coils 1968 Bit
0x03 Read data word by word read holding registers 125 words
0x04 read input registers
0x06 Writedata word by word write single register 123 words
0x10 write multiple registers
0x16 mask write register
0x17 Read and write data word by word read/write multiple registers Read 125 words

Write 121 words