Start | 1 | 2 | 3 | 4 | End | |
---|---|---|---|---|---|---|
Address | Function | Data | CRC Check | |||
T1 | 8 bit | 8 bit | n x 8 bit | L 8 bit | H 8 bit | T1 |
Message Field | Description | |||
---|---|---|---|---|
Address | The address code is 1 byte long (8 bits) and any address from
0 to 247 can be set. Set 0 to send a broadcast message (all-address
instruction) or any of 1 to 247 to send a message to each subordinate. When the subordinate responds, it returns the address set from the master. The value of P.117 is the subordinate address. |
|||
Function | The function code is 1 byte (8 bits) and any address from 0
to 247 can be set. The master sets the function that it wants to request
to the subordinate, and the subordinate performs the requested operation. See the sub-table for the supported function codes. |
|||
Code | Function Name | Outline | Broadcast Communication | |
H03 | Read Holding Register | Reads the holding register data | Not Allowed | |
H06 | Present Single Register | Writes data to the holding register | Allowed | |
H08 | Diagnostics | Function diagnosis (communication check only) | Not Allowed | |
H10 | Present Multiple Register | Writes data to multiple consecutive holding registers | Allowed | |
H46 | Read Holding Register Access Log | Reads the number of registers that succeeded in communication last time | Not Allowed | |
|
||||
Data | The format changes depending on the function code. Data includes the byte count, number of bytes, description of the access to the holding register, and similar information. | |||
CRC Check | The message frame is checked for error by creating a CRC
number. This two-byte long CRC data is added to the end of the message.
When CRC is added to the message, the low-order byte is added first and
is followed by the high-order byte. The CRC value is calculated by the master and is added to the master message. The subordinate recalculates the CRC after the message is received and compares it with the value received in the message. If these values do not match, then the subordinate flags this message as containing an error and discards the message. |