PR 5220 Instrument Manual J-Bus/ModBus Protocol
Sartorius EN-123
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
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-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.
5.4 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)
Example of an error message, which was generated by an invalid function number with ModBus-RTU.
Command 1 9 0 0 0 0 CRC CRC
Reply 1 137 1 CRC CRC
The individual bytes are shown.