Download Type ACPU/QCPU-A (A Mode)(Common Instructions

Transcript
7. APPLICATION INSTRUCTIONS
Functions
MELSEC-A
(1) The CHK instruction is used for error check of a circuit which is to detect
abnormality in reciprocating movements provided with sensors on both stroke
ends as shown below. If an error is detected, (D1) is turned ON, and the error
code is stored in (D2).
Contact commands before the CHK instruction are not to control execution of
the CHK instruction but to set check conditions.
POINTS
(1) Since the CHK instruction is provided to detect the cause of error when an
error such as cycle time over occurred, the circuit which contains the CHK
instruction should be skipped when there is no error. Use the CJ, SCJ or
JMP instruction to skip the CHK instruction.
X060
0
CJ
P30
CJ
P30
If the cycle time over error occurred, Y60
is turned on and the CHK instruction is
executed.
M0
4
P254
8
P30
18
X010 X015 X008 X01A
CHK
M0
D0
If the error is detected by the CHK
instruction execution, M0 is turned ON
and processing jumps to label P30.
M10
(2) When a CHK FORMAT ERR is detected, the error step number is not
stored. (Error step remains 0.)
Example
Forward motion
command (X4)
Forward run (Y50)
Forward
M
Backward run (Y51)
Backward
Turns ON if forward
stroke end sensor (X0)
is turned ON.
Turns ON if backward
stroke end sensor (X1)
Backward motion
is turned ON.
command (X5)
Create the following circuit to check cycle time over in the system illustrated
above.
Follow these instructions in creating a circuit containing the CHK instruction.
1) Contact numbers (X ) of the forward stroke end sensor and the backward
stroke end sensor must be continuous. Contact number of the forward
stroke end sensor (X ) must be lower than that of the backward stroke end
sensor.
2) The internal relay of which number (Y ) is same as the contact number
(X ) of forward stroke end sensors must be controlled as follows.
In forward run: Turn it ON.
In backward run: Turn it OFF.
7 − 112