
WPMZ Series Modbus communication instruction manual
IM-0862-02
Number of pages:109
14
Function code 08H (diagnosis)
It is a communication that diagnoses the communication between the master and the slave and
diagnoses the module.
Transmission and reception format
◎Transmission data (master
→
slave (module))
Table 3.11 Function code 08H Transmission format
n a me
Tra n smi tte d da ta
S l a v e ID
0 1 ~ F F H
Fu n c ti on c o de
0 8 H
D i a g n o s t i c s u b c o d e
U p p e r
0 0 0 0 ~ 0 0 1 2 H
Lo w e r
D a t a f i e l d
U p p e r
0 0 0 0 ~ F F F F H
Lo w e r
E r r o r c h e c k
( C R C - 1 6 )
Lo w e r
0 0 0 0 ~ F F F F H
U p p e r
◎Received data (slave (module)
→
master)
Table 3.12 Function code 08H Reception format
n a me
Re c e i v e d d ata
S l a v e ID
0 1 ~ F F H
Fu n c ti on c o de
0 8 H
D i a g n o s t i c s u b c o d e
U p p e r
0 0 0 0 ~ 0 0 1 5 H
Lo w e r
D a t a f i e l d
U p p e r
0 0 0 0 ~ F F F F H
Lo w e r
E r r o r c h e c k
( C R C - 1 6 )
Lo w e r
0 0 0 0 ~ F F F F H
U p p e r
Diagnostic subcode and diagnostic content
The corresponding diagnostic subcode is shown in the table below.
Table 3.13 Corresponding diagnostic subcode
Diagnostic
subcode
Diagnostic name
Diagnosis contents
00H
Return Query Data
It returns the data of the transmitted data field as it
is.
01H
Restart Communications Option
Restart communication.
02H
Return Diagnostics Register
Returns diagnostic register (fixed as 0 because it is
not used).
04H
Force Listen Only Mode
Set the slave to receive only mode.
0AH
Clear Counters and Diagnostic Register
Clear all counters and diagnostic registers.
0BH
Return Bus Message Count
Returns the total of messages detected by the slave.
0CH
Return Bus Communication Error Count
Returns the total of CRC errors detected by the
slave.
0DH
Return Bus Exception Error Count
Returns the sum of exception responses of Modbus
returned by the specified slave.
0EH
Return Server Message Count
Returns the total of messages received by the
specified slave.
0FH
Return Server No Response Count
Returns the total of messages for which the
specified slave did not respond.
10H
Return Server NAK Count
Returns the total of messages that the specified
slave returned NAK.