Modbus Functions; Read Coil Status; Read Coil Status Query; Read Coil Status Response - ABB 8241 Operating Instructions Manual

8240 series. modbus communication supplement
Table of Contents

Advertisement

8 MODBUS FUNCTIONS

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

8.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 5 coils from slave (01) starting at coil 01 (Out of Service) is shown below.
Address
Function
01
01

8.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:
Monitor Out of Service
Monitor Not in Calibration
Monitor in Hold Mode
Pumps On
Control Temperature Not 'Out of Range'
Address
Function
01
8.2 Read Holding Register – Function Code 03

8.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
11 the data start register must contain 10 (0AH).
Broadcast mode is not allowed.
Example – a read holding register request to read 5 holding registers from slave (01) starting at holding address 05 (Time Hour)
is shown below.
Address
Function
01
03
8
Coil Start
Coil Start
Offset High
Offset Low
00
00
Byte Count
01
01
Register Start
Register Start
Offset High
Offset Low
00
04
Number of
Number of
Coils High
Coils Low
00
05
Data Coil Status
1 to 6
0D
Data Number of
Data Number of
Registers High
Registers Low
00
Error Check Field (CRC-16)
FC
Error Check Field (CRC-16)
90
Error Check Field (CRC-16)
05
C4
09
4D
08

Advertisement

Table of Contents
loading

This manual is also suitable for:

8242

Table of Contents