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

Table of Contents

Advertisement

5 MODBUS FUNCTIONS

This section shows typical examples of MODBUS function codes 01, 03, 05, 06, 08, 15 and 16.
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 10 the
start address must be set to 09 (09H).
Example. Read 16 coils from slave (01) starting at coil 10 (alarm state 1).
A
d
d
e r
s
s
F
u
n
t c
0
1
0
1
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 A3, A4, A5, A6 & A7 active
Alarms A1, A2, & A8 inactive
Alarms A3 & A4 are unacknowledged
Alarms A1, A2, A5, A6, A7 & A8 are acknowledged
A
d
d
e r
s
s
F
u
0
1
10
C
o
l i
S
a t
t r
O
o i
n
H
g i
h
0
0
B
y
e t
n
t c
o i
n
C
o
u
t n
0
1
0
2
f
s f
t e
N
. o
f o
L
o
w
H
g i
h
0
9
0
0
D
a
a t
C
o
l i
D
S
a t
u t
s
1
0
S
o t
1
7
7
C
C
i o
s l
E
r r
r o
L
o
w
1
0
E
D
a
a t
C
o
l i
E
r r
r o
a t
u t
s
1
8
(
o t
2
5
0
C
9
9
C
h
e
c
k
F
e i
d l
(
C
R
C
1
) 6
C
4
C
h
e
c
k
F
e i
d l
C
R
C
1
) 6
3
9

Advertisement

Table of Contents
loading

Table of Contents