Mitsubishi plc two lights alternately on cycle five times

Hello, do you want to ask the function of mitsubishi plc two lights alternately lit cycle five times? Mitsubishi PLC two lights alternately light cycle five times of program implementation, you can consider using the alternate running instruction ALT or use the alternate output instruction ALTP. the following is a simple alternately light PLC program: LDX0, ALTY0,Y1. the function of this program is when X0 is 1, Y0 and Y1 alternately run. When Y0 is 1, Y1 is 0; when Y0 is 0, Y1 is 1. The alternate run instruction requires more than two outputs, so if there is only one output, you cannot use this instruction. If you need to implement the function of alternately lighting two lights for five cycles in your program, you can consider using a counter to achieve it. The specific implementation is as follows: LDX0, CTNCT0,Y0, ALTY0,Y1. the function of this program is that when X0 is 1, the CT0 counter starts counting, and every time Y0 and Y1 are alternated, the counter CT0 is increased by 1, and when the count value of the counter CT0 is 5, it stops counting and resets the CT0. in this way, you can realize the function of two lamps alternately lit five times in the cycle.