Modbus Functions; Read Coil Status - Function Code 01 - ABB C250 User Manual

Control it modbus (rtu) communications option
Table of Contents

Advertisement

5 MODBUS FUNCTIONS

This section shows typical examples of MODBUS function codes 01, 03, 05, 06, 08
and 16. Not all addressable parameters used in the examples which follow are valid
for both instrument types – see Sections 7.1 to 7.4.
5.1 Read Coil Status – Function Code 01
5.1.1 Read Coil Status Query
This function obtains the ON/OFF status of logic coils used to control discrete outputs
from the addressed slave. Broadcast mode is not supported with this function code.
In addition to the slave address and function fields, the information field must contain
the initial coil offset address (starting address) and the number of each location to be
interrogated.
Note. The coil offset address is one less than the coil number, e.g. to start
at coil 06 the start address must be set to 05 (05H).
Example. Read 16 coils from slave (01) starting at coil 6 (alarm state 1).
Address
Function Coil Start
01
01
5.1.2 Read Coil Status Response
The data is packed one bit for each coil (1 = ON, 0 = OFF). The response includes the
slave address, function code, quantity of data characters, the data characters and
error checking. The low order bit of the first character contains the first addressed coil
and the remainder follow. For coil quantities that are not multiples of eight, the last
characters are packed with zeros at the high order end.
Example
Alarms 1, 2 and 3 inactive
Digital input inactive
Digital output inactive
Relays 1 and 2 active
ON/OFF status 1 and 2 active
Address
Function
01
01
Coil Start
Offset High Offset Low Coils High Coils Low
00
05
Byte Count
02
No. of
No. of
00
Data Coil
Data Coil
Status
Status
6 to 13
14 to 21
00
3E
Error Check ( C R C - 1 6 )
Field
10
2D
Error Check
Field
38
C7
(CRC-16)
2C
9

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

V250

Table of Contents