beautypg.com

Message formats, 1 message formats – West Control Solutions N6600 User Manual

Page 38

background image

The Controller will identify itself in response to a Read Holding Registers message

which enquires the values of word parameters 121 and 122 (see Table 4-2);

MODBUS Function 17 (Report Slave ID) is not supported.

4.3.1 Message Formats

The first character of every message is the Controller address, in the range 1 - 128

(standard RS485) or 1 - 255 (enhanced RS485) and 0 for broadcast messages. The

second character is always the Function Number. The contents of the remainder

of the message depends upon this Function Number.

In most cases the Controller is required to reply to the message by echoing the

address and Function Number, together with an echo of all or part of the

message received (in the case of a request to write a value or carry out a

command) or the information requested (in the case of a Read Parameter

operation). Broadcast messages are supported at address 0 (to which the

Controller responds by taking some action without sending back any reply).

Data is transmitted as eight-bit binary bytes with one start bit, one stop bit and

optional parity checking (none, even or odd). A message is terminated simply by

a delay of more than three character lengths at the Baud rate used; any

character received after such a delay is considered to be the potential address

at the start of a new message.

Since only the RTU form of the protocol is supported, each message is followed by

a two-byte CRC 16 (a 16-bit cyclic redundancy checksum). This checksum is

calculated in accordance with a formula which involves recursive division of the

data by a polynomial, with the input to each division being the remainder of the

results of the previous division. The dividing polynomial is

2

16

+ 2

15

+ 2

2

+ 1 (Hex 18005)

but this is modified in two ways:

(a) because the bit order is reversed, the binary pattern is also

reversed, making the most significant bit (MSB) the right-most bit, and

4-2

O075-4

PM-0075

Function

MODBUS Function Number

Read Coil Status (Read n Bits)

01/02

Read Holding Registers (Read n Words)

03/04

Force Single Coil (Write 1 Bit)

05

Preset Single Register (Write 1 Word)

06

Loopback Diagnostic Test

08

Preset Multiple Registers (Write n Words)

16