S 1: pulse output width S2: pulse output period (occupying 3 devices) D: pulse output device.
Description:
1.S 1 pulse output width specifies t: 0 ~ 32767 ms.
2. The output period of S2 pulse is specified as T: 1 ~ 32767 ms, S 1 ≦ S2.
3.S2+1 and S2 +2 are system parameters, so please don't occupy them. D pulse output devices: y, m, s.
4. When executing the GPWM instruction, specify the pulse output width of S 1 and the pulse output period of S2, which will be output by the D pulse output device.
5. When S 1 ≦ 0, the pulse output device has no output; When S 1 ≧ S2, the pulse output device is always on.
6.S 1 and S2 can be changed during the execution of GPWM instruction.
1. This instruction counts according to the scanning cycle, so the maximum error is 1 PLC scanning cycle. The values of S 1, S2 and (S2-S 1) must be
It must be longer than the scanning period of PLC, otherwise the output of GPWW will have wrong action.
2. If this instruction is used in subroutine or interrupt, the output of GPWM will be inaccurate. Please pay special attention.