Pulse-Width Modulation (Pwm) - Siemens SIMATIC S7-1200 Manual

Hide thumbs Also See for SIMATIC S7-1200:
Table of Contents

Advertisement

Easy to use the built-in pulse generators

7.2 Pulse-width modulation (PWM)

7.2
Pulse-width modulation (PWM)
Two pulse generators are available for controlling high-speed pulse output functions: Pulse
Width Modulation (PWM) and Pulse train output (PTO). Since the PWM output can be varied
from 0 to full scale, it provides a digital output that in many ways is the same as an analog
output. For example, the PWM output can be used to control the speed of a motor from stop
to full speed, or it can be used to control position of a valve from closed to fully opened. PTO
is used by the motion control instructions.
The CTRL_PWM instruction provides a fixed cycle time output with a variable duty cycle.
The PWM output runs continuously after being started at the specified frequency (cycle
time). The pulse width is varied as required to affect the control.
You can assign each pulse generator to either PWM or PTO, but not both at the same time.
Configuring the pulse generators
The two pulse generators are mapped to specific digital outputs as shown in the following
table. You can use onboard CPU outputs, or you can use the optional signal board outputs.
The output point numbers are shown in the following table (assuming the default output
configuration). If you have changed the output point numbering, then the output point
numbers will be those you assigned. Regardless, PTO1/PWM1 uses the first two digital
outputs, and PTO2/PWM2 uses the next two digital outputs, either on the CPU or on the
attached signal board. Note that PWM requires only one output, while PTO can optionally
use two outputs per channel. If an output is not required for a pulse function, it is available
for other uses.
Description
84
Cycle time
Pulse width time
Default output assignment
PTO 1
PWM 1
PTO 2
PWM 2
Duty cycle can be expressed, for example, as a
percentage of the cycle time or as a relative quantity
(such as 0 to 1000 or 0 to 10000). The pulse width
can vary from 0 (no pulse, always off) to full scale (no
pulse, always on).
Onboard CPU
Signal board
Onboard CPU
Signal board
Onboard CPU
Signal board
Onboard CPU
Signal board
Pulse
Direction
Q0.0
Q0.1
Q4.0
Q4.1
Q0.0
--
Q4.0
--
Q0.2
Q0.3
Q4.2
Q4.3
Q0.2
--
Q4.2
--
Manual, 11/2009, A5E02486774-01
Easy Book

Advertisement

Table of Contents
loading

Table of Contents