Function 16: writing n successive words, 5 error messages, Error messages – Rice Lake PR5230 Fieldbus Transmitter User Manual

Page 174: J-bus/modbus protocol, Pr 5230 instrument manual

Advertising
background image

J-Bus/ModBus Protocol

PR 5230 Instrument Manual

EN-174

Sartorius

Function 16: Writing n Successive Words

Command

Device
address

Function
number

Address of
1st word

Number of
words

Number of
bytes

Value of
words

1 byte

1 byte

2 bytes

2 bytes

1 byte

n bytes

Range

0...127

16

0...63

1...64

2...128


MSB

LSB

MSB

- - - - - - MSB

LSB

1

st

word

last word


Reply

Device address

Function
number

Address of 1st
word

Number of
words

1 byte

1 byte

2 bytes

2 bytes

If the address is out of the permissible range (0...63), an error message is sent as a reply (the address plus the
number of bytes must not exceed 64).
Example of function 16 for writing the limit_1 switch-on point using value 893 with ModBus-RTU:
Command

1

16 0

48 0

2

4

0

0

3

125 CRC CRC

Reply

1

16 0

48 0

2

CRC CRC

Example with ModBus-TCP:
Command

47 15 0

0

0

8

0

16 0

48 0

2

4

0

0

3

125

Reply

47 15 0

0

0

6

0

16 0

48 0

2

The individual bytes are shown.

6.5

Error Messages

If a command was transmitted correctly, but cannot be executed because e.g. the address is too high, an error
message is sent as a reply to the command.
The error message has the following format:

Device address

Function number +128

Error number

CRC 16

1 byte

1 byte

1 byte

2 bytes

The 2nd byte contains the received function number; the most significant bit is set additionally.
Meaning of the error number:

1

The function number is unknown

2

The address is out of the permissible range

3

The data format is faulty (e.g. more data than specified in the number were written)

Advertising