Specifications

SIMATIC Instructions
9-54
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
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 and final 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 this example, a simple formula can be used to determine the delta cycle time
value that the PTO/PWM generator uses to adjust the cycle time of each pulse:
delta cycle time = | ending cycle time - initial cycle time | / quantity of pulses
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.