
11
01
10
00
31
00
02
10
07
8.6
Preset Multiple Registers – Function Code 16
8.6.1
Preset Multiple Registers Query
Holding registers existing within the controller can have their contents changed by this message. When used with slave address
zero (Broadcast mode) all slave controllers load the selected registers with the contents specified.
Note.
To write to multiple registers, the initial register offset address must be used, e.g. to write to register 02 onwards,
the offset address 01 is transmitted.
Example –
a preset multiple registers request to write the value 1000 to the register address (Output Range 1) and the value 2000
to the register address (Output Range 2) in slave 01 is shown below.
8.5
Loopback Test – Function Code 08
8.5.1
Loopback Test Query
The purpose of the loopback test is to test the MODBUS system, it does not affect the content of the controller. Variations in the
response may indicate faults in the MODBUS system. The information field contains 2 bytes for the designation of the diagnostic
code followed by 2 bytes to designate the action to be taken.
Example
:
01
08
00
31
04
02
32
C5
Register
Offset High
Function
Address
Register
Offset Low
Error Check Field (CRC-16)
Data Value High
Data Value Low
01
08
00
31
04
02
32
C5
Function
Address
Error Check Field (CRC-16)
Data *
Data Diagnostic
Code High
Data *
Data Diagnostic
Code Low
8.5.2
Loopback Test Response
The response always echoes the query, only diagnostic code 0 (bytes 3 and 4) can be used.
Example
:
*These are considered to be the information fields for diagnostic mode.
…8
MODBUS FUNCTIONS
Register
Start
Offset
Low
Register
Start
Offset
High
01
10
00
31
00
02
04
08
00
0F
FF
76
A7
Holding
Register
03 Low
Holding
Register
03 High
Holding
Register
02 High
Holding
Register
02 Low
Byte
Count
Number
of
Registers
Address Function
Error Check Field
(CRC-16)
8.6.2
Preset Multiple Registers Response
The response confirms slave identification, function code, starting register address and quantity only.
Example:
Function
Address
Error Check Field (CRC-16)
Register Start
Offset High
Register Start
Offset Low
Number of Registers
Summary of Contents for 8241
Page 26: ...24 NOTES ...