Modbus Functions; Read Coil Status - Function Code 01; Read Coil Status Query; Read Coil Status Response - ABB C1900 Installation Manual

Circular chart recorder and recorder/controller, modbus (rtu) communications option
Hide thumbs Also See for C1900:
Table of Contents

Advertisement

5 MODBUS FUNCTIONS

This section shows typical examples of Modbus function codes 01, 03, 05, 06, 08 and 16.
5.1 Read Coil Status – Function Code 01

5.1.1 Read Coil Status Query

This function allows the user to obtain the ON/OFF status of logic coils used to control discrete outputs from the addressed slave
only. Broadcast mode is not supported with this function code. In addition to the slave address and function fields, the message
requires that the information field contain the initial coil offset address to be read (starting address) and the number of locations
to be interrogated must obtain status data.
Note. The coil offset address is the coil number minus one, e.g. to start at coil 31 the data start value must be set to 30 (1EH).
– a read coil status request to read 16 coils from slave (01) starting at coil 31 (alarm A status channel 1) is shown below.
Example
Address
Function
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 even multiples of eight, the last characters are filled in with zeros at high
order end.
– the response to the read coil status query shows the following:
Example
Alarm A status channel 1 ON
Alarm B status channel 1 OFF
Alarm C status channel 1 ON
Alarm D status channel 1 OFF
Alarm A,B,C,D status channel 2 all OFF
Alarm A,B,C,D status channel 3 all OFF
Alarm A,B,C,D status channel 4 all OFF
Address
Function
01
01
5.2 Read Holding Register – Function Code 03

5.2.1 Read Holding Register Query

The Read holding registers allow the user to obtain the binary contents of holding registers in the addressed slave.
Note. The data start register must contain the offset address of the first register to be accessed, e.g. to start at register 121the
data start register must contain 120 (78H).
Broadcast mode is not allowed.
– a read holding register request to read 6 holding registers from slave (01) starting at holding address 121 (alarm trip
Example
A1) is shown below.
Address
Function
01
03
Coil Start
Coil Start
Offset High
Offset Low
00
1E
Data Coil Status
Byte Count
31 to 38
02
Register Start
Register Start
Offset High
Offset Low
00
78
Number of
Number of
Coils High
Coils Low
00
Data Coil Status
39 to 46
05
00
Data Number of
Data Number of
Registers High
Registers Low
00
Error Check Field (CRC-16)
10
5D
Error Check Field (CRC-16)
BA
Error Check Field (CRC-16)
06
45
C0
AC
D1
9

Advertisement

Table of Contents
loading

Table of Contents