Modbus tcp/ip function codes, Error checking, Exception response – Comtrol ES8508 Series User Guide User Manual

Page 202

Advertising
background image

202 - Modbus TCP/IP Function Codes

RocketLinx ES8508 Series User Guide: 2000575 Rev. A

ModBus TCP /IP Support

Ethernet, thus the Modbus TCP/IP master can read or write to the Modbus registers provided by the Modbus
TCP/IP.

The ES8508 firmware provides Modbus TCP/IP registers that map to the ES8508 operating system
information which, includes the description, IP address, power status, interface status, interface information
and inbound/outbound packet statistics. With the register support, you can read the information through the
Modbus TCP/IP based progress/ display/ monitor applications and monitor the status of the switch easily.

Modbus TCP/IP Function Codes

Modbus TCP/IP devices use a subset of the standard Modbus TCP/IP function codes to access device-dependent
information. Modbus TCP/IP function codes are defined in the following table.

Error Checking

The utilization of the error checking helps eliminate errors caused by noise in the communications link. In
Modbus TCP/IP mode, messages include an error-checking field that is based on a Cyclical Redundancy Check
(CRC) method. The CRC field checks the contents of the entire message. It is applied regardless of any parity
check method used for the individual BYTE characters of the message. The CRC value is calculated by the
transmitting device, which appends the CRC to the message. The receiving device recalculates a CRC during
receipt of the message, and compares the calculated value to the actual value it received in the CRC filed.

Exception Response

If an error occurs, the slave sends an exception response message to master consisting of the slave address,
function code, exception response code and error check field. In an exception response, the slave sets the high-
order bit (MSB) of the response function code to one.

Function

Code

Name

Usage

01

Read Coils

Reads the state of a digital output.

02

Read Input Status

Reads the state of a digital input.

03

Read Holding Register

Reads the holding register in 16-bit register format.

04 (see note)

Read Input Registers

Reads data in 16-bit register format.

05

Write Coil

Writes data to force a digital output ON/OFF.

06

Write Single Register

Writes data in 16-bit register format.

15

Force Multiple Coils

Writes data to force multiple consecutive coils.

Note: The ES8508 supports Function Code 04, the Read Input Registers. With this support, the

remote SCADA or other Modbus TCP/IP applications can poll the information of the device
and monitor the major status of the ES8508.

Code

Name

Descriptions

01

Illegal Function

The message function received is not an allowable action.

02

Illegal Data Address

The address referenced in the data field is not valid.

03

Illegal Data Value

The value referenced a t the addressed device location is not
within range.

04

Slave Device Failure

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

Advertising