Delta Electronics — 6.20.2 Explanation of Other Instructions

AS Series Programming Manual Symbol S 1 : Pulse width S 2 : Pulse cycle D : Output device Explanation _6 1. This instruction outputs every pulse with a width specified by S 1 and with a cycle specified by S 2 from the device specified by D . 2. The pulse width specified by S 1 is t. t must be between 0–3276 milliseconds. 3. The pulse cycle specified by S 2 is T. T must be between 1–32767 milliseconds, and S 1 should be less than S 2 . 4. The S 2 +1 and S 2 +2 parameters are for system use. Please do not change them. 5. If S 1 is less than 0, there is no pulse output. If S 1 is larger than S 2 , the output device stays ON. 6.

You can change S 1 and S 2 during the execution of this instruction. 7. If the conditional contact is not enabled, there is no pulse output. 8. When using on-line editing, please reset the conditional contact to initialize the instruction. Example When the program is executed, the values in D0 and D2 are 1000 and 2000 respectively. When X0.0 is ON, the device Y0.0 outputs the pulses illustrated below. When X0.0 is OFF, Y0.0 is OFF.

6-634 API Instruction code Operand Function 1902 GPWM S1, S2, D General pulse width modulation Device X Y M S T C HC D FR SM SR E K 16# “$” F S1        S2     D     BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S1    S2    D  Pulse instruction 16-bit instruction 32-bit instruction ─ AS ─