41
7 OPTION
41
OPTION
Chapter
7
Keep in mind that the relative address for reading the digital zero value is 0x02.
In cases less than 8 bits, the remainder bits become "0".
* The F331 response (coil state) is always "0" (because processing is executed at the stage of
reading the command).
To confirm coil execution, judge as complete with a normal response to function code 05
(0x05) Write signal coil or 15 (0x0F) Write multiple coils.
02 (0x02) Read discrete inputs
ON/OFF states of slave input statuses are read.
No broadcast can be specified.
Specify the status start address and number of statuses.
* N = Number of statuses/8 or N = N + 1 if indivisible
Example) Read the states from ±LOAD (address 10001) to NZ (address 10008).
Keep in mind that the relative address for reading the ±LOAD value is 0x00.
The example shows the case where the F331 conditions are as follows:
The LSB of the first data corresponds to the status of the beginning address.
It is expressed as 00100000 (0x20) in binary notation.
* The statuses can also be read by function code 04 (0x04) Read input registers.
The statuses can be read together with indicated values by function code 04.
[Request]
Function 1 byte 0x02
Start address 2 bytes 0x0000 - 0xFFFF
Number of statuses 2
bytes 1 - 2000 (0x07D0)
[Response]
Function 1 byte 0x02
Number of data bytes 1
byte N *
Status state N bytesN or N+1
[Error response]
Error code 1 byte 0x82 (function + 0x80)
Exception code 1
byte 01 or 02 or 03
[Request]
Function 02
[Response]
Function 02
Start address; higher 00 Number of data bytes 01
Start address; lower 00 ±LOAD - NZ 20
Number of statuses; higher 00
Number of statuses; lower 08
±LOAD OFF (0)
OFL1, OFL2 OFF (0)
HH OFF (0)
HI OFF (0)
OK OFF (0)
LO ON (1)
LL OFF (0)
NZ OFF (0)