INST.No.INE-863B KR2S
【
Communication Interface
】
Instruction Manual
-29-
7-4
Message creation
A message is consisted of 1) Slave address, 2) Function code, 3) Data part and 4) Error check code. (Refer
to Para. 7-3)
The number of data that can be read once is within the following range.
Transmission mode
Number of data
RTU
120
ASCII
120
The creating method of a message is explained in the following example.
Example) Reading of the measurement data of “Channel 1” of this unit set by the “Slave address 02”.
7-4-1
RTU mode message
1) Slave address: 02 ([02H])
2) Function code: 04 ([04H])
It is the reading of the analog input data (contents of input register). When the function code is
“04”, it is necessary to specify “Relative number of data 2 bytes” for reading in the data part and
“Number of data 2 byte” for reading. (Refer to Para. 7-5 Refer to Para. 7-5-4 for “Function code:
04”.)
* It is necessary to confirm the number of bytes of data.
3)Data part: Starting relative number 100 ([00H][64H]) , Number of data 2 ([00H][02H] )
The measured data (analog input data) is stored in the reference number 30001 to 40000. (Refer
to Para. 7-3-4 Table 3). By the reference table, you will understand that the integer part of CH1 is
stored in “30101” and the decimal place is stored in "30102". (Refer to Para. 7-5 and refer to Para.
7-5-3 for reading of measured data.) The relative number of the starting “Reference number
30101” is 30101-30001=100. If it is expressed in 2 bytes, it becomes “[00H][64H] “. The number of
data to be read is the integer part of CH 1 and the decimal place and if it is expressed in the
hexadecimal 2 bytes, it becomes “[00H][02H] “.
4)Error check: Calculation by the CRC-16 2730H ([30H][27H] )
The error check in RTU mode is performed by the CRC-16. (Refer to Para. 7-3-5) The data of basic
part of the message becomes [02H][04H][00H][64H][00H][02H] as per 1) to 3), and the CRC-16
becomes 2730H. Therefore the error check data becomes [30H][27H].
5) Message: A message is created with the configuration of
[02H][04H][00H][64H][00H][02H][30H][27H].(Refer to 7-3)
Содержание KR2S
Страница 2: ...INST No INE 863B KR2S Communication Interface Instruction Manual ...
Страница 124: ...INST No INE 863B KR2S Communication Interface Instruction Manual ...
Страница 125: ...INST No INE 863B KR2S Communication Interface Instruction Manual ...
Страница 126: ...INST No INE 863B KR2S Communication Interface Instruction Manual ...
Страница 127: ...INST No INE 863B KR2S Communication Interface Instruction Manual ...