6 Programming Features
139
• Function code: Command codes (See below.)
• Data: Composes a series of data by combining holding register numbers
(test codes for loop-back numbers) and their data. Data length
depends on the contents of the command.
• Error check: CRC-16 (Calculate the value by the following method.)
1. The default value at calculation of CRC-16 is normally 0. In the
MEMOBUS system, change the default to 1 (all to 16-bit).
2. Calculate CRC-16 assuming that the loop address LSB is MSB and
the last data MSB is LSB.
3. Also calculate CRC-16 for a response message from the slave and
refer it to CRC-16 in the response message.
• Read Out Holding Register Contents (03H)
Reads out the contents of the specified number of continuous hold-
ing registers. The contents of each holding register is divided into
the upper 8 bits and the lower 8 bits. They become the data items in
the response message in numerical order.
Func-
tion
Code
Hexa-
decimal
Function
Reference Message
Response Message
Minimum
(Bytes)
Maximum
(Bytes)
Minimum
(Bytes)
Maximum
(Bytes)
03H
Reading holding
register contents
8
8
7
37
08H
Loop-back test
8
8
8
8
10H
Write in several
holding registers
11
41
8
8