Appendix 2.2 Reading Error Code - Mitsubishi Electric MELSEC Q Series Programming Manual

Motion controller, real mode
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

APPENDICES

APPENDIX 2.2 Reading error code

[Program Example]
System configuration
Q61P
Q03UD
Q172D
CPU
CPU
Motion SFC program
Reading error code (minor error/major error)
Reading error code
[F10]
#0=K0
[G10]
M2407
[G20]
D6!=K0
[F20]
#0=BCD(D6)
DOUT PY0, #0
[G30]
D7!=K0
[F30]
#0=BCD(D7)
DOUT PY10, #0
END
The program example for reading error code at the error occurrence is shown below.
The following signals are used to determine whether or not an error has occurred:
• Minor errors, major errors .......... Error detection signal (M2407+20n)
• Servo errors ........................... Servo error detection signal (M2408+20n)
POINT
(1) The following delay occurs for leading edge of M2407+20n/M2408+20n and
storage of the error code.
(a) If the sequence program scan time is 80[ms] or less, there will be a delay of
up to 80[ms].
(b) If the sequence program scan time is 80[ms] or more, there will be a delay of
up to one scan time.
The error code is stored to each error code storage area after turning on
M2407+20n/M2408+20n, and then read the error code.
(1) A program that outputs each error code to PY000 to PY00F (minor error), PY010
to PY01F (major error) and PY020 to PY02F (servo error) after conversion into
BCD code at the error occurrence with axis 1 is shown below.
QY40P
QY40P QY40P
Q172D
LX
PY000
PY010
PY020
to
to
to
PY00F
PY01F
PY02F
Store to "#0".
Error detection signal
ON for axis 1.
Minor error check
for axis 1.
Output to PY000 after
converting the minor
error code of D6 into
BCD code.
Major error check for
axis 1.
Output to PY010 after
converting the major
error of D7 into BCD
code.
Reading error code (servo error)
Reading error code
[F10]
#0=K0
[G10]
M2408*(D8!=0)
[F20]
#0=BCD(D8)
DOUT PY20, #0
END
APP - 69
Store to "#0".
Error detection signal ON
for axis 1 and the servo
error check for axis 1.
Output to PY020 after
converting the servo
error code for axis 1 into
BCD code.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents