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 areaUseAccessAccess typeMeaning
1 – 256Input RegisterRead OnlyHolding/Input *Values that the other RevPi Gate supplies.
1025 – 1280Output RegisterRead/WriteHoldingValues that are supplied to the other RevPi Gate.
4097/0x1001Gateway StatusRead OnlyHoldingDisplays the connection status to the other RevPi Gate.
0x01Initialisation, checking Hardware.
0x02Connection to the other gateway component is checked.
0x03Other gateway component detected.
0x04Communication to the other gateway component established.
4098/0x1002Fieldbus status of the other gateway componentRead OnlyHolding0x00Fieldbus not connected. Check all Connections.
0x01Fieldbus connected, no data communication. Check whether an IP address is set.
0x02Gateway component configured, no data communication.
0x03Cyclical data Exchange.
4099/0x1003IP AddressRead/WriteHoldingIP Address High Word
4100/0x1004IP AddressRead/WriteHoldingIP Address Low Word
4101/0x1005Network MaskRead/WriteHoldingNetwork Mask High Word
4102/0x1006Network MaskRead/WriteHoldingNetwork Mask Low Word
4103/0x1007Gateway AddressRead/WriteHoldingGateway Address High Word
4104/0x1008Gateway AddressRead/WriteHoldingGateway Address Low Word
4105/0x1009Max. Number of Modbus/TCP connectionsRead/WriteHoldingShows the maximum number of Modbus/TCP connections that can exist simultaneously.

Value Range: 2-20

4106/0x100aCurrent number of Modbus/TCP connectionsRead OnlyHoldingShows the current number of Modbus/TCP Connections.
4107/0x101bWrite TimeoutRead/WriteHoldingThe 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/0x100cResetRead/WriteHoldingRestarts 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 areaUseAccess Access typeMeaning
1 – 3840Input Bits (Coil)Read OnlyHolding/Input*Values that the other gateway component supplies.
16385 – 20224Output Bits (Coil)Read/WriteHoldingValues 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 codeUseDescriptionMax. size per telegram
0x01Read data bit by bitread coils2000 Bit
0x02read discrete inputs
0x05Write data bit by bitwrite single coil1 Bit
0x0fwrite multiple coils1968 Bit
0x03Read data word by wordread holding registers125 words
0x04read input registers
0x06 Writedata word by wordwrite single register123 words
0x10write multiple registers
0x16mask write register
0x17Read and write data word by wordread/write multiple registersRead 125 words

Write 121 words