3 . I ns t r uc ti on Se t3- 4 32. When the instruction MC is executed, the previous state of the switch contact is put onto thetop of the stack inside the PLC. The stack is controlled by the PLC, and can not be changed byusers. When the instruction MCR is executed, the previous state of the switch contact ispopped from the top of the stack. Under the conditions listed in (b), (d), and (e) above, thenumber of times the items are pushed onto the stack may be different from the number oftimes the items are popped from the stack. When this situation occurs, at most 32 items canbe pushed onto the stack, and the items can be popped form the stack until the stack is empty.Therefore, when CJ or CJP is used with MC and MCR, users have to be careful of the pushingof the item onto the stack and the popping of the item from the stack.Program example 3:The table explains the device status in the ladder diagram below.Device Contact statebefore CJ executionContact stateduring CJ executionOutput coil stateduring CJ executionY, M, SM1, M2, M3 OFF M1, M2, M3OFF→ON Y1 *1, M20, S1 OFFM1, M2, M3 ON M1, M2, M3ON→OFF Y1 *1, M20, S1 ON10ms,100msTimer*2M4 OFF M4 OFF→ON Timer is not activatedM4 ON M4 ON→OFFTimer T0 immediately stops andis latched. When M0 ON OFF,T0 will be reset.1ms,10ms,100msaccumulativeTimerM6 OFF M6 OFF→ON Timer T240 is not activatedM6 ON M6 ON→OFFTimer T240 immediately stopsand is latched. When M0 ON OFF, T240 will still be latched.C0~C234 *3M7, M10 OFF M10 is ON/OFFtriggered Counter C0 stopsM7 OFF, M10 isON/OFF triggeredM10 is ON/OFFtriggeredCounter C0 stops and latched.When M0 is OFF, C0 resumescounting.ApplicationinstructionM11 OFF M11 OFF→ON Application instructions will notbe executed.M11 ON M11 ON→OFFThe skipped applicationinstruction will not be executedbut API 53~59, API 157~159keep executing.*1: Y1 is dual output. When M0 is OFF, it is controlled by M1. When M0 is ON, M12 will control Y1*2: When timer that subroutine used (T184~T199) executes first and then CJ instruction isexecuted, the timer will keep counting. After the timer reaches the set value, output contact oftimer will be ON.*3: When high-speed counters (C235~C254) executes first and then CJ instruction is executed,the counter will keep counting and its associated output status remains.