114
Pulse I/O Board Section 2-2
Example 3: Using
PLS(––) to Accelerate/
Decelerate the Frequency
at the Same Rate
The following example shows PLS2(––) used to output 100,000 CW pulses
from port 1. The frequency is accelerated to 10 kHz at approximately 500 Hz/
4 ms and decelerated at the same rate.
Five seconds after the CW pulses have been output, another PLS2(––)
instruction outputs 100,000 CCW pulses with the same settings.
The following diagram shows the frequency of pulse outputs from port 1 as
the program is executed.
@PLS2(−−)
000
001
05000
DM 0000
TIM 000
#0050
When IR 05000 turns ON, PLS2(−−) starts CW pulse output
from port 1.
Acceleration rate: Approx. 500 Hz/4 ms
Target frequency: 10,000 Hz
Number of pulses: 100,000
When AR 0514 (Pulse Output Completed Flag) turns ON,
a 5-second timer is started.
SET 05000
00000
IR 05000 is turned ON when IR 00000 is ON.
AR 0514
@PLS2(−−)
001
001
TIM 000
DM 0000
After 5 seconds elapses following completion of CW pulse
output, PLS2(−−) starts CCW pulse output from port 1 using
same conditions:
Acceleration rate: Approx. 500 Hz/4 ms
Target frequency: 10 kHz
Number of pulses: 100,000
RSET 05000
Turns 05000 OFF when TIM 000 times out.
DM 0000 0050
DM 0001 1000
DM 0002 0000
DM 0003 0010
Frequency
Time
10 kHz
IR 05000
turns ON
AR 0514
turns ON
CW pulse output
CCW pulse output
After 5 s
About 500 Hz/4 ms
500 Hz
approx. 4 ms
500 Hz
approx. 4 ms
100,000 pulses 100,000 pulses
1 kHz