3. Instruction Set number of feedbacks x percentage value / 100), users can improve the situation by adjusting the percentage value, ramp-up/ramp-down time or target frequency. Program Example1: Immediate stop high-speed pulse output by external interrupt 1. Adopt X4 as the input for external interrupt and I401 (rising-edge trigger) as the interrupt pointer. Set target number of feedbacks = 50,000; target frequency = 100kHz; pulse output device: Y0, Y1 (CH0); start/end frequency (D1340) = 100Hz; ramp-up time (D1343) = 100ms; ramp-down time (D1348) = 100ms; percentage value (D1131) = 100; present value of output pulses (D1030, D1031) = 0. M1002 EI M0 FEND M1000 I401 IRET END 2.
Execution results: Frequency X4 = OFF --> ON 100kHz Y0 output stops D1340 D1340 Time Pulse number D1343 D1348 Specified number of output pulses: 50,000 Actual number of output pulses (D1030, D1031) = K51000 3-475 MOV K100 D1131 MOV K100 D13403 MOV K100 D1343 MOV K100 D1348 SET M1534 DMOV K0 D1030 DCLLM X4 K50000 K100000 Y0 INC D0