8.5 Loopback Test – Function Code 08
8.5.1 Loopback Test Query
The purpose of the loopback test is to test the Modbus system, it does not affect the content of the controller. Variations in the
response may indicate faults in the Modbus system. The information field contains 2 bytes for the designation of the diagnostic
code followed by 2 bytes to designate the action to be taken.
Example:
A
d
d
e r
s
s
F
u
n
t c
o i
n
0
1
0
8
8.5.2 Loopback Test Response
The response always echoes the query, only diagnostic code 0 (bytes 3 and 4) can be used.
Example:
A
d
d
e r
s
s
F
u
n
t c
o i
n
0
1
0
8
*
T
h
e
s
e
a
e r
c
o
n
s
d i
e
e r
d
o t
b
e
8.6 Preset Multiple Registers – Function Code 16
8.6.1 Preset Multiple Registers Query
Holding registers existing within the controller can have their contents changed by this message. When used with slave address
zero (Broadcast mode) all slave controllers load the selected registers with the contents specified.
Note. To write to multiple registers, the initial register offset address must be used, e.g. to write to register 02 onwards,
the offset address 01 is transmitted.
Example – a preset multiple registers request to write the value 90.0 to the register address (Alarm Set Point 1) and the value 30.0
to the register address (Alarm Set Point 2) in slave 01 is shown below.
R
e
A
d
d
e r
s
s
F
u
n
t c
o i
n
H
g i
0
1
1
0
0
8.6.2 Preset Multiple Registers Response
The response confirms slave identification, function code, starting register address and quantity only.
Example:
A
d
d
e r
s
s
F
u
n
t c
o i
n
0
1
1
0
R
e
i g
t s
r e
R
e
i g
t s
O
f
s f
t e
H
g i
h
O
f
s f
t e
L
0
0
0
B
D
a
a t
D
a i
g
n
o
t s
c i
D
a
a t
C
o
d
e
H
g i
h
C
0
0
h t
e
i
f n
r o
m
t a
o i
n
f
e i
d l
s
f
r o
d
a i
g
n
i g
t s
r e
S
a t
t r
N
u
m
b
r e
f o
O
f
s f
t e
R
e
g
s i
e t
s r
h
L
o
w
0
0
B
0
0
0
2
R
e
i g
t s
r e
S
a t
t r
R
e
i g
t s
r e
O
f
s f
t e
H
g i
h
O
f
s f
t e
L
0
0
0
B
r e
D
a
a t
V
a
u l
e
H
g i
h
D
a
o
w
0
9
D
a i
g
n
o
t s
c i
D
t a
* a
o
d
e
L
o
w
0
B
0
9
o
s
c i t
m
o
d
. e
H
o
d l
n i
g
R
e
i g
t s
B
y
e t
0
2
C
o
u
t n
H
g i
h
L
o
0
4
0
E
6
S
a t
t r
N
u
m
b
r e
f o
R
e
o
w
0
0
8 MODBUS FUNCTIONS
a t
V
a
u l
e
L
o
w
E
r r
r o
C
h
e
9
9
5
7
D
t a
* a
E
r r
r o
C
h
e
9
9
5
7
r e
H
o
d l
n i
g
R
e
i g
t s
r e
0
3
w
H
g i
h
L
o
w
5
0
4
C
C
g
s i
e t
s r
E
r r
r o
C
h
e
0
2
3
0
c
k
F
e i
d l
(
C
R
C
1 -
) 6
F
3
c
k
F
e i
d l
(
C
R
C
1 -
) 6
F
3
E
r r
r o
C
h
e
c
k
F
e i
d l
(
C
R
C
1 -
) 6
A
2
7
E
c
k
F
e i
d l
(
C
R
C
1 -
) 6
0
A
11