Pulse; Ctrl_Pwm (Pulse Width Modulation) Instruction - Siemens S7-1200 System Manual

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

Advertisement

Extended instructions

8.6 Pulse

Note
In the DB, you must manually type in the data type to access each of the three structures;
there is no dropdown list selection. Type in the data types exactly as shown below:
• DNN
• DIS
8.6
Pulse
8.6.1

CTRL_PWM (Pulse width modulation) instruction

Table 8- 146 CTRL_PWM (Pulse Width Modulation) instruction
LAD / FBD
STEP 7 automatically creates the DB when you insert the instruction.
1
In the SCL example, "CTRL_PWM_DB" is the name of the instance DB.
2
Table 8- 147 Data types for the parameters
Parameter and type
PWM
IN
ENABLE
IN
BUSY
OUT
STATUS
OUT
The CTRL_PWM instruction stores the parameter information in the DB. The data block
parameters are not separately changed by the user, but are controlled by the CTRL_PWM
instruction.
Specify the enabled pulse generator to use, by using its tag name for the PWM parameter.
When the EN input is TRUE, the PWM_CTRL instruction starts or stops the identified PWM
based on the value at the ENABLE input. Pulse width is specified by the value in the
associated Q word output address.
364
SCL
"CTRL_PWM_DB"(
PWM:=_word_in_,
enable:=_bool_in_,
busy=>_bool_out_,
status=>_word_out_);
Data type
Description
HW_PWM
PWM identifier: Names of enabled pulse generators will become tags in
(Word)
the "constant" tag table, and will be available for use as the PWM
parameter. (Default value: 0)
Bool
1=start pulse generator
0 = stop pulse generator
Bool
Function busy (Default value: 0)
Word
Execution condition code (Default value: 0)
Description
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 desired
control.
System Manual, 03/2014, A5E02486680-AG
S7-1200 Programmable controller

Advertisement

Table of Contents
loading

Table of Contents