Delta DVP — 1.10 Alternate Output Circuit (With Latched Function)

1. Basic Program Design Examples 1.10 Alternate Output Circuit (With Latched Function) Control Purpose: z Setting the light ON by pressing the switch for the 1 st time, the 3 rd time, 5 th time, etc.; setting the light OFF by pressing the switch for the 2 nd time, 4 th time, 6 th time, etc. z Restoring the indicator to the state before power off when the device is powered up again. Devices: Control Program: X1 T for rigger pulse one scan cycle M10 Y1 If X1 is pressed for odd number of times, M512=ON, M513=OFF M10 Y1 If X1 is pressed for even number of times, M512=OFF, M513=ON M512 M513 Y1 Y1 will be ON/OFF if X1 is pressed for odd/even number of times Y1 Program Description:

z Pressing X1 for the 1 st time (or odd number of times): When the switch X1 is pressed, X1 will be ON and the [PLS M10] instruction will be executed for triggering M10 to be ON for one scan cycle. In this case, M10 is ON and Y1 is OFF, SET and RST instructions at line 2 will thus be executed. On the contrary, SET and RST instructions at line 3 will not be executed due to the open loop of Y1. At line 4, coil Y1 is ON because of the results of Line 2: M512 is ON and M513 is OFF. When the 2 nd scan cycle is started, SET/RST at both line 2 and line 3 will not be executed because M10 is OFF in this z Pressing X1 for the 2 nd time (or even number of times): scan cycle.

As a result, the light will be ON until the switch is pressed next time. When the switch X1 is pressed again, X1 will be ON and M10 will be ON for one scan cycle. According to the result of pressing X1 for the first time, the state of Y1 has been ON. SET/RST instructions at line 3 will thus be executed. In addition, SET/RST instructions at DVP-PLC Application Examples 1-10 Device Function X1 Light switch. X1 will be ON when the button is pressed M10 Trigger pulse for one scan cycle M512 If X1 is pressed for odd number of times, M512 ON, M513 = OFF. M513 If X1 is pressed for even number of times, M512 = OFF, M513 = ON. Y1 Indicator PLS M10 SET M512 RST M513 SET M513 RST M512