Explanation Of Function Codes; Read Coil Status [01H] - Omron MX2 User Manual

200 v class three-phase input 0.1 to 15 kw 200 v class single-phase input 0.1 to 2.2 kw 400 v class three-phase input 0.4 to 15 kw
Hide thumbs Also See for MX2:
Table of Contents

Advertisement

Network Protocol Reference
B-3-4

Explanation of function codes

Note 1
Note 2
Note 3
Note 4
Item
Coil Number
14
Coil Status
OFF
268

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.
Field Name
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)
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.
• 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.
13
12
11
OFF
OFF
OFF
• 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.
Data
[1]
[2]
[3]
7
8
9
ON
OFF
ON
Response:
Example
No.
(Hex)
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
10
9
OFF
ON
Section B-3
[4]
[5]
10
11
OFF
OFF
Field Name
Example
(Hex)
08
01
01
05
92
17
8
7
OFF
ON

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents