Siemens SIMATIC S7-200 System Manual page 150

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

Advertisement

S7-200 Programmable Controller System Manual
There are two different ways to change the characteristics of a PWM waveform:
Synchronous Update: If no time base changes are required, you can use a synchronous
-
update. With a synchronous update, the change in the waveform characteristics occurs on
a cycle boundary, providing a smooth transition.
Asynchronous Update: Typically with PWM operation, the pulse width is varied while the
-
cycle time remains constant so time base changes are not required. However, if a change
in the time base of the PTO/PWM generator is required, an asynchronous update is used.
An asynchronous update causes the PTO/PWM generator to be disabled momentarily,
asynchronous to the PWM waveform. This can cause undesirable jitter in the controlled
device. For that reason, synchronous PWM updates are recommended. Choose a time
base that you expect to work for all of your anticipated cycle time values.
Tip
The PWM Update Method bit (SM67.4 or SM77.4) in the control byte specifies the update type
used when the PLS instruction is executed to invoke changes.
If the time base is changed, an asynchronous update occurs regardless of the state of the PWM
Update Method bit.
Using SM Locations to Configure and Control the PTO/PWM Operation
The PLS instruction reads the data stored in the specified SM memory locations and programs the
PTO/PWM generator accordingly. SMB67 controls PTO 0 or PWM 0, and SMB77 controls PTO 1
or PWM 1. Table 6-36 describes the registers used to control the PTO/PWM operation. You can
use Table 6-37 as a quick reference to determine the value to place in the PTO/PWM control
register to invoke the desired operation.
You can change the characteristics of a PTO or PWM waveform by modifying the locations in the
SM area (including the control byte) and then executing the PLS instruction. You can disable the
generation of a PTO or PWM waveform at any time by writing 0 to the PTO/PWM enable bit of the
control byte (SM67.7 or SM77.7) and then executing the PLS instruction.
The PTO Idle bit in the status byte (SM66.7 or SM76.7) is provided to indicate the completion of
the programmed pulse train. In addition, an interrupt routine can be invoked upon the completion
of a pulse train. (Refer to the descriptions of the Interrupt instructions and the Communications
instructions.) If you are using the multiple segment operation, the interrupt routine is invoked upon
completion of the profile table.
The following conditions set SM66.4 (or SM76.4) and SM66.5 (or SM76.5):
Specifying a cycle time delta value that results in an illegal cycle time after a number of
-
pulses generates a mathematical overflow condition that terminates the PTO function and
sets the Delta Calculation Error bit (SM66.4 or SM76.4) to 1. The output reverts to image
register control.
Manually aborting (disabling) a PTO profile in progress sets the User Abort bit (SM66.5 or
-
SM76.5) to 1.
Attempting to load the pipeline while it is full sets the PTO/PWM overflow bit (SM66.6 or
-
SM76.6) to 1. You must clear this bit manually after an overflow is detected if you want to
detect subsequent overflows. The transition to RUN mode initializes this bit to 0.
Tip
When you load a new pulse count (SMD72 or SMD82), pulse width (SMW70 or SMW80), or
cycle time (SMW68 or SMW78), also set the appropriate update bits in the control register
before you execute the PLS instruction. For a multiple segment pulse train operation, you must
also load the starting offset (SMW168 or SMW178) of the profile table and the profile table
values before you execute the PLS instruction.
136

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents