Modbus Client and Server Roles

This section describes the network topology of the RAPTOR as a Modbus Client or Server.

Modbus Client and Server Gateway Responsibilities

RAPTOR Client and server gateways do the following:

The RAPTOR should be used as a client or a server when the Master and Slave are not native TCP speakers.

Figure 1. RAPTOR as a Modbus Client or Server


Modbus Server Role

The RAPTOR when used as a modbus server can do the following:

Figure 2. Modbus TCP Server Topology


Modbus Client Role

The RAPTOR when used as a modbus client can do the following:

Figure 3. Modbus TCP Client Topology


Modbus Function and Exception Codes

A response function code is valid if:

The exception function code is equivalent to the request function code with its most significant bit set to logic 1. Example: the 0x83 code is the exception for the function code 0x03.

Table 1. Exception codes generated by a Slave
Name Description
ILLEGAL_FUNCTION The function code is not an allowable action for the slave.
ILLEGAL_DATA_ADDRESS The data address is not an allowable address for the slave.
ILLEGAL_DATA_VALUE The data field is not an allowable value for the slave.
ACKNOWLEDGE The slave has accepted the request and is processing it, but a long duration of time will be required to do so.
SLAVE_DEVICE_BUSY The slave is engaged in processing a long-duration program command.
MEMORY_PARITY_ERROR The extended file area failed to pass a consistency check.
Table 2. Exception codes generated by a Gateway
Name Description
ILLEGAL_FUNCTION The function code is not an allowable action for the slave.

RAPTOR: returned if function code does not match the broadcast command.

SERVER_DEVICE_FAILURE An unrecoverable error occurred while the slave was attempting to perform the requested actions.

RAPTOR: not returned

SERVER_DEVICE_BUSY The server is busy with other commands and has no place to store the request.

RAPTOR: returned if hold time is over, no place to store the request

GATEWAY_PATH_UNAVAILABLE The gateway is mis-configured or overloaded.

RAPTOR: returned if slave is not in the slaves list. No connection to a server.

GATEWAY_TARGET_DEVICE_FAILED_TO_RESPOND No response was obtained from the target device.

RAPTOR: no response was obtained from the target device.