Chapter 6 Communication Mode
6 - 39
Mod
b
u
s M
a
ster
Function code 0x01 (Read Coil Status)
The function code 01 is a query to read the state of coil of the slave system. Broadcasting is not supported.
(1) Sending data area format
Sending data area requires 4 words. Please set 6 bytes for head word.
Figure 6.28 Sending data area format (Function code 0x01)
1) Device No.: Set the slave number by hexadecimal number. (H01 to HFF. H00 cannot be used.)
2) Function code: Set the function code to H01.
3) Starting address: Set the starting address of coil by hexadecimal number. (H0000 to HFFFF)
4) Number of coils: Set the number of coils by hexadecimal number. (H0000 to H07F0)
Ex.) Read status of 16 coils from address 32 of the slave No.24.
The head address of sending data area WR100
WR100 = H0006
WR101 = H1801
WR102 = H001F
WR103 = H0010
(2) The state of receiving data area
1) Completed properly
Figure 6.29 Receiving data area format (Function code 0x01)
When a response is received properly from the slave, completion flag (t+1) will be ON, and the coil information
is stored in the address specified by the query from LSB. Since the information on the coil is handled per byte, 0
is stored in the remaining area when the information on a coil does not fill 1 byte.
For example, when nine pieces of coil are read, 0 is stored in b9-b15.
Figure 6.30 Storing of coil information (not fill 1 byte)
EH-SIO handles coil data by word unit. If received data from the slaves is odd number byte, this data will be sent
to CPU module as even number byte with one byte attached.
0
0
0
1
1
0
0
0
0
1
1
0
0
0
0
1
b15
b0
b7
b8
Number of receive data (bytes)
1 word
…
n+7
n
n+15
b15
b7
b0
…
n+8
b8
Head address specified by the query
in LSB.
…
Number of coils
Device No.
0 1
Starting address
H 0 0 0 6
1 word
01:
Function code
Starting address of coil to read
The number of coils to read
Содержание EH-150 Series
Страница 1: ...HITACHI PROGRAMMABLE CONTROLLER Serial Communication Module EH SIO APPLICATION MANUAL NJI 443F X ...
Страница 2: ......
Страница 10: ...M E M O ...
Страница 30: ...Chapter 4 Installation 4 10 M E M O ...
Страница 156: ...Chapter 7 System setup 7 12 M E M O ...
Страница 164: ...Chapter 8 Daily and Periodic Inspection 8 8 M E M O ...