Delta Electronics — 6.8.2 Explanation of Miscellaneous Instructions

Chapter 6 Applied Instructions 6.8.2 Explanation of Miscellaneous Instructions Symbol D : Destination device Explanation 1. This instruction alternates the state of the device specified by D between ON and OFF. 6_ 2. In general, use the ALTP pulse instruction. Example 1 When X0.0 switches from OFF to ON for the first time, Y0.0 is ON. When X0.0 switches from OFF to ON for the second time, Y0.0 is OFF. Example 2 In the beginning, M0 is OFF; therefore, Y0.0 is ON, and Y0.1 is OFF. When X0.0 switches from OFF to ON for the first time, M0 is ON; therefore, Y0.0 is OFF, and Y0.1 is ON. When X0.0 switches from OFF to ON for the second time, M0 is OFF; therefore, Y0.0 is ON, and Y0.1 is OFF.

6-179 API Instruction code Operand Function 0700 ALT P D Alternating between ON and OFF Device X Y M S T C HC D FR SM SR E K 16# “$” F D       BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type D  Pulse instruction 16-Bit instruction 32-Bit instruction AS AS -