14 
 
 
(6)  Message format for Read Input Registers (Function code: 0x04) 
● This function will be used to read the item data of IJ printer, which is read only, or used to read 
the status of IJ printer. 
●  The maximum number of bytes that can be read in the Input 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  0x04 
Sets function code (Read Input 
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  0x04  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  0x84  Adds 0x80 to function code received. 
3  Error code  1 byte  0x01 to 0x03 
Sets error code. Error code differs 
according to cause. 
 
 
(7) Error code 
Error code 
 
 
 
 
 
 
 
 
No.  Name  Code  Conditions 
1  Illegal function code  0x01  Function code not yet supported is set. 
2  Illegal address  0x02  Illegal address is set. 
3  Illegal data  0x03  Illegal data is set.