Modbus Functions; Read Coil Status - Function Code 01; Read Coil Status Query; Read Coil Status Response - ABB C1300 User Manual Supplement

Advanced circular chart recorder
Hide thumbs Also See for C1300:
Table of Contents

Advertisement

C1300
Advanced Circular Chart Recorder

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).
Example – a read coil status request to read 16 coils from slave (01) starting at coil 31 (alarm A status channel 1) is shown below.
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.
Example – the response to the read coil status query shows the following:
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 121 the
data start register must contain 120 (78H).
Broadcast mode is not allowed.
Example – a read holding register request to read 6 holding registers from slave (01) starting at holding address 121 (alarm trip A1) is
shown below.
Address
Function
01
03
IM/C1300–MOD
Rev. C
Coil Start Offset
High
Low
00
1E
Data Coil Status
Byte Count
31 to 38
02
05
Register Start Offset
High
Low
00
78
Number of Coils
High
Low
00
10
Data Coil Status
39 to 46
00
Data Number of Registers
High
Low
00
06
5 Modbus Functions
Error Check Field
(CRC-16)
5D
C0
Error Check Field
(CRC-16)
BA
AC
Error Check Field
(CRC-16)
45
D1
9

Advertisement

Table of Contents
loading

Table of Contents