Function code field, Data block field, Error check field – Basler Electric BE1-851 Modbus Protocol User Manual

Page 10: Serial transmission details, Message framing and timing considerations

Advertising
background image

1-2 BE1-851

Modbus

Protocol

9289900992 Rev F

Function Code Field

The function code field in the query message defines the action to be taken by the addressed slave. This
field is echoed in the response message and is altered by setting the most significant bit (MSB) of the
field to 1 if the response is an error response. This field is 1 byte.

The BE1-851 maps all available data into the Modicon 984 holding register address space (4XXXX) and
supports the following function codes:

• Function 03 (03 hex) - read holding registers

• Function 06 (06 hex) - preset single register (write single holding register)

• Function 08 (08 hex), subfunction 00 - diagnostics: return query data

• Function 08 (08 hex), subfunction 01 - diagnostics: restart communications option

• Function 08 (08 hex), subfunction 04 - diagnostics: force listen only mode

• Function 16 (10 hex) - preset multiple registers, non-broadcast and broadcast

Data Block Field

The query data block contains additional information needed by the slave to perform the requested
function. The response data block contains data collected by the slave for the queried function. An error
response will substitute an exception response code for the data block. The length of this field varies with
each query. See the paragraphs on Register Definitions in this manual for interpretation of data.

Error Check Field

The error check field provides a method for the slave to validate the integrity of the query message
contents and allows the master to confirm the validity of response message contents. This field is 2 bytes.

Serial Transmission Details

A standard Modbus

™ network offers two transmission modes for communication: ASCII or remote

terminal unit (RTU). The BE1-851 supports only the RTU mode.

Each 8-bit byte in a message contains two 4-bit hexadecimal characters. The message is transmitted in a
continuous stream with the LSB of each byte of data transmitted first. Transmission of each 8-bit data
byte occurs with one start bit and either one or two stop bits. Parity checking is performed, when enabled,
and can be either odd or even. The transmission baud rate is user-selectable and can be set at
installation and altered during real-time operation. The BE1-851 Modbus

™ supported baud rates are

2400, 4800, 9600, and 19200. The factory default baud rate is 9600.

BE1-851 supports both RS-232-C and RS-485 compatible serial interfaces. Both interfaces are
accessible from the rear panel of the BE1-851. The RS-232-C interfaces (front and rear) are configured
for ASCII command mode while the RS-485 interface is configured for Modbus

™ communication when

this option is installed. The eighth character of the relay style number must be “1” for the relay to be
configured for Modbus

™.

Message Framing and Timing Considerations

When receiving a message, the BE1-851 requires an inter-byte latency of 3.5 character times before
considering the message complete.

Once a valid query is received, the BE1-851 waits a specified amount of time before responding. This
time delay is set in the remote delay time parameter with the SG-COM ASCII command. This parameter
contains a value from 10 - 200 milliseconds. The default value is 10 milliseconds.

Table 1-1 provides the response message transmission time (in seconds) and 3.5 character times (in
milliseconds) for various message lengths and baud rates.

Table 1-1. Timing Considerations

Message Tx Time (seconds)

Baud Rate

3.5 Character Time (mSec)

128 Bytes

256 Bytes

2400 16.04 0.59

1.17

4800 8.021 0.29

0.59

9600 4.0104 0.15

0.29

19200 2.0052

0.07

0.15

Advertising
This manual is related to the following products: