<3. MODBUS PROTOCOL>
3-2
IM 11G02Q02-01EN 2nd Edition : Sep. 04, 2020-00
(3) Data
Data field is required to execute function codes. The data construction depends on function code.
For details, refer to “4. DETAILS OF MESSAGE”
A register number is assigned to each data in IR202. For reading / writing the data by
communication, designate the register number.
Note that the register number transmitted on message is expressed as its relative address.
The relative address is calculated by the following expression.
Relative address = (The lower 4 digits of( the registered number or coil)) - 1
For example, when the registered number designated by a function code is 40003,
Relative address = (lower 4 digits of 40003) – 1 = 0002
is used on the message.
(4) Error check code
This is the code to detect message errors (change in bit) in the signal transmission.
On the MODUBUS protocol (RTU mode), CRC-16 (Cyclic Redundancy Check) is applied.
For CRC calculation method, refer to “”
3.2
Response of slave station
(1) Response to normal command
To a relevant message, the slave station creates and sends back a response message which
corresponds to the command message. The composition of message in this case is the same as
in section 3.2.
Contents of the data field depend on the function code. For details, refer to
(2) Response to abnormal command
If a command message contains an abnormality (for example, non-actual function code is
designated) other than transmission error, the slave station does not execute that command but
creates and sends back a response message at error detection.
The composition of response message at an error detection is as shown in Figure 3-2. To fill in
the field of function code, sum the values of Function code in the received command message
and 80
H
, then put the value into the field of function code.
Station No.
Function code +80
H
Error Code
Error check (CRC-16)
Figure3-2
Response message at error detection
Table3-1 Error code
Error code
Contents
Description
01H
Illegal function Non-actual function code is designated. Check for the function code.
02H
Illegal function A relative address of a register number to which the designated function code
can not be used.
03H
Illegal function Because the designation of number is too much, the area where register
numbers do not exist is designated.
Summary of Contents for IR202
Page 7: ...Blank Page ...
Page 13: ...Blank Page ...
Page 43: ...Blank Page ...
Page 45: ...Blank Page ...