Diagnostics (Fc: 08H) - Mitsubishi Electric MELSEC iQ-R Series Reference Manual

Modbus and modbus/tcp
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

3.8

Diagnostics (FC: 08H)

Executes the various diagnostics and checks the C24 status and communication status.
In the diagnostics, a sub-function code is specified after a function code with a request message.
Checking communication conditions using a diagnostic counter
When using the MODBUS slave function, the number of error occurrences during communication is stored in a diagnostic
counter.
The communication status of MODBUS can be checked by a diagnostic counter of the MODBUS standard function.
■ Diagnostic counter
Counter
Type
Description
*1
Bus message count
Counts the number of messages detected on the line.
Bus communication error
Counts the number of the following error messages detected on
*1
count
the line.
• CRC/LRC error message
• Overrun/parity error
• Short frame (less than 3 bytes)
• Character overrun (256 bytes or more)
Messages other than the above are counted by the bus
message count.
Exception error count
Counts the number of exception error occurrences.
(Including broadcast messages)
Slave message count
Counts the number of times that messages addressed to the
host were processed.
(Including when broadcast request messages were received)
Slave no-response count
Counts the number of times that broadcast request messages
were received.
Slave NAK count
Refers to the number of times that NAK responses were
received in a master device.
It is always '0' in C24s.
Slave busy count
Refers to the number of times that busy responses were
received in a master device.
It is always '0' in C24s.
Character overrun count
Counts the number of times that the request message size
exceeded the upper limit.
*1 The bus message count is in an exclusive relationship with the bus communication error count.
■ Count range
0000H to FFFFH are counted.
The count is stopped if it has reached FFFFH. To continue, clear the counter.
■ Methods for clearing a counter
A counter can be cleared by any of the following methods:
• Turning the power OFF and ON
• Resetting a CPU module
• Clearing the buffer memory to '0' by using a sequence program
• Receiving the following MODBUS standard functions
Counter to be cleared
All diagnostic counters shown above
Character overrun count
MODBUS standard function
Page 23 Restart communications option (sub-function code: 01H)
Page 27 Clear counters and diagnostic register (sub-function code: 0AH)
Page 37 Clear overrun counter and flag (sub-function code: 14H)
Buffer memory
MODBUS standard function
CH1
CH2
Page 28 Return bus message
32512
32576
(7F00H)
(7F40H)
count (sub-function code: 0BH)
Page 29 Return bus
32513
32577
(7F01H)
(7F41H)
communication error count (sub-
function code: 0CH)
32522
32586
Page 30 Return bus exception
(7F0AH)
(7F4AH)
error count (sub-function code: 0DH)
Page 31 Return slave message
32518
32582
(7F06H)
(7F46H)
count (sub-function code: 0EH)
32519
32583
Page 32 Return slave no response
(7F07H)
(7F47H)
count (sub-function code: 0FH)
Page 33 Return slave NAK count
32520
32584
(7F08H)
(7F48H)
(sub-function code: 10H)
32521
32585
Page 34 Return slave busy count
(7F09H)
(7F49H)
(sub-function code: 11H)
Page 35 Return bus character
32514
32578
(7F02H)
(7F42H)
overrun count (sub-function code: 12H)
Page 36 Return IOP overrun error
count (sub-function code: 13H)
3 MODBUS STANDARD FUNCTION DETAILS
3.8 Diagnostics (FC: 08H)
3
21

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents