Explanation Of Function Codes - Hitachi WJ200 Series Instruction Manual

Wj200 series single-phase input 200v class three-phase input 200v class three-phase input 400v class
Hide thumbs Also See for WJ200 Series:
Table of Contents

Advertisement

B−10

Explanation of function codes

Read Coil Status [01h]:
This function reads the status (ON/OFF) of selected coils. An example follows below.
• Read intelligent input terminals [1] to [5] of an inverter having a slave address "8."
• This example assumes the intelligent input terminals have terminal states listed
below.
Item
Intelligent input
terminal
Coil number
Coil Status
Query:
No.
1
Slave address *1
2
Function code
3
Coil start address *4
(high order)
4
Coil start address *4
(low order)
5
Number of coils
(high order *2)
6
Number of coils
(low order *2)
7
CRC-16 (high order)
8
CRC-16 (low order)
Note 1:
Note 2:
Note 3:
Note 4:
• The data set in the response shows terminal state of coils 0007h~000Dh.
• Data "05h = 00000101b" indicates the following assuming coil 7 is the LSB.
Item
Coil Number
Coil Status
• When a read coil is outside the defined coils, the final coil data to be transmitted
contains "0"as the status of the coil outside the range.
• When the Read Coil Status command cannot be executed normally, see the
exception response.
[1]
[2]
7
8
ON
OFF
Example
Field Name
(Hex)
Broadcasting is disabled.
When 0 or more than 31 is specified as a number of coils, error code "03h" is
returned.
Data is transferred by the specified number of data bytes (data size).
The PDU Coils are addressed starting at zero. Therefore coils numbered 1-31
are addressed as 0-30. Coil address value (transmitted on Modbus line) is 1
less than the Coil Number.
14
13
OFF
OFF
Data
[3]
[4]
[5]
9
10
11
ON
OFF
OFF
Response:
No.
Field Name
08
1
Slave address
01
2
Function code
00
3
Data size (in bytes)
06
4
Coil data *3
00
5
CRC-16 (high order)
05
6
CRC-16 (low order)
1C
91
Data
12
11
OFF
OFF
Example
(Hex)
08
01
01
05
92
17
10
9
8
OFF
ON
OFF
7
ON

Advertisement

Table of Contents
loading

Table of Contents