Delta Electronics AH — 3.22 Other Instructions

AH Motion Controller – Standard Instructions Manual _3 Graphic expression: S 1 : Pulse width S 2 : Pulse cycle D : Output device Explanation: 1. When the instruction GPWM is executed, every pulse with a width specified by S 1 and with a cycle specified by S2 is output from the device specified by D. 2. The pulse width specified by S1 is t. t should be within the range between 0 and 3276 milliseconds. 3. The pulse cycle specified by S2 is T. T should be within the range between 1 and 32767 milliseconds, and S1 should be less than S2. 4. S2+1 and S2+2 are parameters for system use. Please do not occupy them. 5. If S1 is less than 0, there is no pulse output.

If S1 is larger than S2, the output device keeps ON. 6. S1 and S2 can be altered during the execution of the instruction GPWM. 7. If the conditional contact is not enabled, there is no pulse output. 8. When the on-line editing is used, 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 pulses illustrated below are output from Y0.0. When X0.0 is OFF, Y0.0 is OFF.

3-484 FB/FC Instruction Operand Description FC GPWM S , S , D 1 2 General pulse width modulation BOOL WORD DWORD LWORD UINT UDINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S 1   S 2   D  Device X Y M S T C HC/AC D L SM SR E PR K 16# “$” D F S 1         S 2        D       Pulse instruction 16-bit instruction 32-bit instruction - AH Motion CPU -