SIMATIC Instructions
9-54
S7-200 Programmable Controller System Manual
A5E00066097-02
Calculating Profile Table Values
The multiple segment pipelining capability of the PTO/PWM generators can be
useful in many applications, particularly in stepper motor control.
The example shown in Figure 9-20 illustrates how to determine the profile table
values required to generate an output waveform that accelerates a stepper motor,
operates the motor at a constant speed, and then decelerates the motor.
10 kHz
2 kHz
Frequency
Time
Segment #1
(200 pulses)
Segment #2 Segment #3
(400 Pulses)
4,000 pulses
Figure 9-20 Example Frequency vs. Time Diagram for Simple Stepper Motor Application
For this example, it is assumed that 4,000 pulses are required to achieve the
desired number of motor revolutions. The starting and final pulse frequency is
2 kHz and the maximum pulse frequency is 10 kHz. Since profile table values are
expressed in terms of period (cycle time) instead of frequency, convert the given
frequency values into cycle time values. Therefore, the starting (initial) and final
(ending) cycle time is 500 µs and the cycle time corresponding to the maximum
frequency is 100 µs.
During the acceleration portion of the output profile, it is desired that the maximum
pulse frequency be reached in approximately 200 pulses. It is also assumed that
the deceleration portion of the profile should be completed in around 400 pulses.
In the Figure 9-20 example, a simple formula (shown below) can be used to
determine the delta cycle time value for a given segment that the PTO/PWM
generator uses to adjust the cycle time of each pulse:
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ
delta cycle time for a given segment = | ECT - ICT | / Q
where, ECT = ending cycle time for this segment
ICT = initial cycle time for this segment
Q = quantity of pulses in this segment
Using this formula, the delta cycle time for the acceleration portion (or segment #1)
is calculated to be -2. Likewise, the delta cycle time for the deceleration portion (or
segment #3) is calculated to be 1. Since segment #2 is the constant speed portion
of the output waveform, the delta cycle time value for that segment is zero.