13
(5) Message format for Read Holding Registers (Function code: 0x03)
●
This function will be used to read the item data of IJ printer, which is readable and writable.
●
The maximum number of bytes that can be read in the Holding Register per time is 250 bytes;
if this number is exceeded, you must divide the data into smaller segments while updating the
starting address each time.
Request message configuration
No. Name Size
Range
Description
1 Device address
1 byte
0x01 to 0x03
Sets device address.
2 Function code
1 byte
0x03
Sets function code (Read Holding
Registers).
3 Start address
2 bytes
0x0000 to
0xFFFF
Sets reading start address. Address
is set in word units.
4 No. of words to be read 2 bytes
1 to 125.
Sets number of words to be read.
Response message data configuration (normal)
No. Name Size
Range
Description
1 Device address
1 byte
0x01 to 0x03
Sets device address received as it is.
2 Function code
1 byte
0x03
Sets function code received as it is.
3 No. of bytes to be read
1 byte
2 to 250
Sets number of data bytes to be read.
4 Data to be read
2 to 250
bytes
0x0000 to
0xFFFF
Sets data to be read (variable length
of 2 to 250 bytes).
Response message data configuration (abnormal)
No. Name Size
Range
Description
1 Device address
1 byte
0x01 to 0x03
Sets device address received as it is.
2 Function code
1 byte
0x83
Adds 0x80 to function code received.
3 Error code
1 byte
0x01 to 0x03
Sets error code. Error code differs
according to cause.