Mitsubishi — 3.2 Explanations on Basic Instructions

3 Basic Instructions 2. MCR is the main-control end instruction that is placed in the end of the main-control program. There should not be any contact instructions prior to MCR instruction. 3. MC-MCR main-control program instructions support the nested program structure (max. 8 layers) and please use the instruction in the order N0 ~ N7. Program Example: Ladder diagram: Instruction code: Operation: LD X0 Loading in A contact of X0 LD X1 Loading in A contact of X1 OUT Y0 Driving Y0 coil : LD X2 Loading in A contact of X2 LD X3 Loading in A contact of X3 OUT Y1 Driving Y1 coil : : : LD X10 Loading in A contact of X10 LD X11 Loading in A contact of X11 OUT Y10 Driving Y10 coil : Explanations:

The method of using LDP is the same as using LD, but the actions of the two instructions differ. LDP saves the current content and store the detected status of rising-edge to the accumulative register. DVP-PLC Application Manual 3-12 Instruction type Explanation Devices driven by SET and RST instructions Stay intact Application instructions All disabled. The FOR-NEXT nested loop will still execute back and forth for N times. Instructions between FOR-NEXT will act as the instructions between MC and MCR.

MC N0 X1 Y0 X2 MC N1 X3 Y1 MCR N1 MCR N0 X10 MC N0 X11 Y10 MCR N0 MC N0 MCR N0 MC N0 Enabling N0 common series connection contact MC N1 MC N1 Enabling N1 common series connection contact MCR N1 Disabling N1 common series connection contact MCR N0 MCR N0 Disabling N0 common series connection contact MC N0 MC N0 Enabling N0 common series connection contact MCR N0 Disabling N0 common series connection contact Mnemonic Function Program steps Controllers ES EX SS SA SX SC EH2 SV EH3 SV2 LDP Rising-edge detection operation 1 X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999 Operand       - Controllers ES EX SS SA SX SC EH 2 SV EH 3 SV2