
Programming options
5.3 Powerful and easy-to-use instruction set
Easy Book
Manual, 05/2009, A5E02486774-01
65
S7-1200 provides powerful instructions
In addition to the basic instructions, S7-1200 also provides an impressive set of instructions
that help you easily resolve complex control applications. The following instructions are just a
sampling of the power packed into the S7-1200.
PID_Compact instruction: PID (Proportional/Integral/Derivative)
control calculates the difference between feedback and set
point value with the PID algorithm and outputs the result to
actuators (such as heater or frequency converter) in order to
maintain the set point.
The "PID_ Compact" statement makes a PID controller with
optimizing self tuning for automatic and manual mode
available.
Execute the "PID_Compact" instruction at constant intervals of
the sampling time (preferably in a cyclic interrupt OB).
The "PID_Compact" instruction measures the time interval between two calls and evaluates
the results for monitoring the sampling time. A mean value of the sampling time is
generated at each mode changeover and during initial startup. This value is used as
reference for the monitoring function and is used for calculation in the block. Monitoring
includes the current measuring time between two calls and the mean value of the defined
controller sampling time.
Modes
Description
Inactive
After the user program has been downloaded the first time, the PID controller remains
in the "Inactive" operating mode. In this case carry out a "Self tuning during initial
start" in the commissioning window. During ongoing operation the PID controller
changes to the "Inactive" operating mode when an error occurs or when the
"Controller stop" icon is clicked in the commissioning window.
Self tuning
The "Self tuning during initial start" or "Self tuning at the operating point" operating
mode executes when the function is called in the commissioning window.
Automatic
mode
In auto mode, the "PID_Compact" instruction corrects the control loop in accordance
with specified parameters.
Manual mode The manipulated variable can be set manually if the PID controller is operated in
manual mode.
PWM instruction: The CTRL_PWM Pulse Width Modulation
(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 effect the desired control.
For more information, see the description of pulse-width modulation (Page 86).