AH500 Motion Control Module Manual Explanation D : Destination device When the instruction ALT is executed, the state of D alternates between ON and OFF. Generally, the pulse instruction ALTP is used. When X0.0 is turned from OFF to ON for the first time, Y0.0 is ON. When X0.0 is turned from OFF to ON for the second time, Y0.0 is OFF. Example 1 X0.0 Example 2 In the beginning, M0 is OFF, and therefore Y0.0 is ON, and Y0.1 is OFF. When X1.0 is turned from OFF to ON for the first time, M0 is ON. Therefore, Y0.1 is ON, and Y0.0 is OFF. When X1.0 is switched from OFF to ON for the second time, M0 is OFF. Therefore, Y0.0 is ON, and Y0.1 is OFF.
X1.0 ALT M0 M0 Y0.0 M0 Y0.1 When X2.0 is ON, T0 generates a pulse every two seconds. The output Y0.0 alternates between ON and OFF according to the pulses generated by T0. Example 3 X2.0 5-74 API Instruction code Operand Function Alternating between 66 ALT P D ON and OFF Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z D Pulse instruction 16-bit instruction (3 steps ) 32-bit instruction – ALTP Y0.0 0.0 0.0 TMR T0 K20 T0 ALTP Y0.0 TMR T0 K20 ALTP Y0.0