Siemens SIMATIC S7-200 System Manual page 152

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

S7-200 Programmable Controller System Manual
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.
For example, you can use PTO with a pulse profile
to control a stepper motor through a simple ramp
up, run, and ramp down sequence or more
complicated sequences by defining a pulse profile
that consists of up to 255 segments, with each
segment corresponding to a ramp up, run, or ramp
down operation.
Figure 6-30 illustrates sample profile table values
required to generate an output waveform that
accelerates a stepper motor (segment 1) operates
accelerates a stepper motor (segment 1), operates
the motor at a constant speed (segment 2), and
then decelerates the motor (segment 3).
For this example: The starting and final pulse frequency is 2 kHz, the maximum pulse frequency is
10 kHz, and 4000 pulses are required to achieve the desired number of motor revolutions. Since
the values for the profile table are expressed in terms of period (cycle time) instead of frequency,
you must 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, the maximum pulse
frequency should be reached in approximately 200 pulses. The deceleration portion of the profile
should be completed in approximately 400 pulses.
You can use the following formula 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 segment = | End_CT
where: End_CT
Init_CT
Quantity
Using this formula to calculate the delta
cycle time values for the sample
application:
Segment 1 (acceleration):
Delta cycle time =
Segment 2 (constant speed):
Delta cycle time =
Segment 3 (deceleration):
Delta cycle time =
Table 6-38 lists the values for generating
the example waveform (assumes that the
profile table is located in V memory, starting
at V500). You can include instructions in
your program to load these values into
V memory, or you can define the values of
the profile in the data block.
138
seg
= Ending cycle time for this segment
seg
= Initial cycle time for this segment
seg
= Quantity of pulses in this segment
seg
--2
0
1
Frequency
10 kHz
2 kHz
1
1
2
Segment #1
200 pulses
Figure 6-30 Frequency/Time Diagram
-- Init_CT
| / Quantity
seg
seg
Table 6-38
Profile Table Values
Address
Value Description
VB500
3
Total number of segments
VW501
500
Initial cycle time
VW503
- -2
Initial delta cycle time
VD505
200
Number of pulses
VW509
100
Initial cycle time
VW511
0
Delta cycle time
VD513
3400
Number of pulses
VW517
100
Initial cycle time
VW519
1
Delta cycle time
VD521
400
Number of pulses
Time
2
3
4,000 pulses
3
Segment #2
Segment #3
3400 pulses
400 pulses
Segment 1
g
Segment 2
g
Segment 3
g

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents