Communication manual TOHO ELECTRONICS INC.
DWG.No. 4B-6829-A
- 15 -
5.1.3.
Explanation about Codes
■
The following codes from (a) Slave Address, (b) Function Code up to (h) Error Number will beexpressed in 8-bit binary code:
(a) Slave Address
It is an address of the device that will be communicated by the upper computer (this product).
Address in the response message form this product indicates the source of response message.
(b) Function Code
Enter the code 03H or 10H.
・
03H: If the data is to be read from this product
・
10H: If the data is to be written or saved into this product
(c) Register Address
Specifies the position of data to be read or written with 2bytes.
See “
” for the address of each command.
(d) Number of Registers
Specifies the number of registers that writes.
Since the number of registers of this product is fixed to 2, set it to “0002H.”
(e) CRC-16
It is an error-checking code for the detection of a possible error in the message. It sends CRC-16 (Cyclic Redundancy Code).
Generating polyomical of CRC-16 that is used in this product is X16 + X15 + X2 + 1.
If it is to be attached at the end of the message as an error number, attach the lower byte of CRC before the upper byte.
(f) Number of Bytes
Specifies the number of registers that reads and writes x 2.
Since the number of registers of this product is 2 (fixed), set “04H.”
(g) Data Section
Specifies the data to be written into the register. Data is 4 bytes (fixed).
If the data contains a decimal point, set the numeric value that ignores the decimal point.
Data that is enclosed inparentheses is the value that will be used in the actual messag
e to be sent. See “
Structure of Request Message (Data Transmission from Upper Computer to This Product)
” for details.
Contents of Communication
HEX Data
PV = 1200.0 (
℃
)
00002EE0h (2EE00000)
PV = -10.00 (
℃
)
FFFFFC18h (FC18FFFF)