Topic: DMD0141 PID - Closed Loop Controller |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The Closed Loop Controller (PID) instruction implements a Proportional, Integral, and optionally Derivative control algorithm in the Do-more CPU. The PID instruction calculates an "error" value as the difference between a measured process variable (PV) and the desired setpoint (SP). The PID controller attempts to minimize the error by adjusting the PID Output, which then affects the process control inputs.
The general function of the PID instruction is to use a continuous feedback loop to keep the process flowing normally by taking corrective action whenever there is a deviation from the desired value (SP) of the process variable (PV) such as, rate of flow, temperature, voltage, etc. The resulting .Output value is calculated as a percentage value in the range of 0.0 to 100.0.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Instruction Inputs:The PID Loop's mode (Auto or Manual) is controlled by the power-flow of the PID instruction's single ladder logic input labeled (A/M) (Auto mode / Manual mode).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters:Note: Use the F9 key or click the 'three dot box' at the right edge of the parameter field to open the Default Element Selection Tool (the Element Picker or the Element Browser) or use the Down-Arrow key (Auto-Complete) on any parameter field to see a complete list of the memory locations that are valid for that parameter of the instruction.
PID Struct is a user-assigned name to uniquely identify the PID Loop. This can be a either a new Heap Item A Heap item and it's associated memory are not preallocated in a default Memory configuration. They are single items as opposed to one entry of a memory block. A Heap Item can be created in the Memory Configuration or be created when the instruction using it is added to the ladder diagram. to create, or the name of a PID Struct that has already been created.
Note: choosing to create a new heap item will change the System Configuration. Changes to the System Configuration can only be saved to the Do-more controller when it is in PROGRAM mode. Additional Run mode updates can not be performed until these System Configuration changes have been saved to the controller. For more information on heap items and pre-allocating one or more PID loops refer to the Memory Configuration section in the System Configuration utility.
If the PID Struct field is changed, the dialog at the right will be displayed.
Loop Algorithm selects the type of calculation to be done:
Control Loop selects
the relationship between the Output value and the Error value:
Initialization Mode : a bumpless
transfer from manual mode to automatic mode is achieved by preventing
the control output from changing immediately after the mode change.
Enabling the Scale to .PV option will scale the raw input value to engineering units before it's used as the Process Variable (.PV). This calculation is made in both Automatic and Manual modes.
Other Options specify optional
processing of the Error term If both Error Squared and Error Deadband
are enabled, the error will be squared first, then the Error Deadband
calculation will be made.
Scale from .Output % enables optional scaling of the Output value (.Output) before it's stored in the designated analog output location. The raw .Output value has a range of 0.0 to 100.0. This calculation is made in both Automatic and Manual modes.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Closed Loop Controller (PID) Structure Members:Each Closed Loop Controller (PID) instruction has an associated PID structure. The structure's fields are updated each time the PID instruction is executed. The Input fields of a PID loop structure are used for writing configuration data to the PID loop, to manage the PID loop's mode, and to manage the Autotune process. The structure's Output fields are calculated by the PID algorithm and can be used to monitor the loop's response to its configuration and the input values.
The following is a list of the fields that are programmatically accessible for each PID Loop instruction:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Status Display:
The yellow triangle in the upper left corner indicates this is a Multi-Scan instruction.
When the ladder status is ON (Debug -> All Status On), in addition to the key PID numeric status values being displayed, the Closed Loop Controller instruction also displays two small trends that show the PID structure's values graphically. The first graph shows the Set Point and Process Variable input values. The second graph shows the Control Output value.
To turn off the trend display, go to the View -> Options menu, select the Ladder tab, then uncheck the Show Trend Status selection.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data View Display Formats:The Data View dialog in Do-more Designer has four display formats for a Closed Loop Controller (PID) structure, two that offer different orientations (single line and multi-line) and two that offer different numbers of data points (short and long). These formats are for display purposes only, the PID Loop variables cannot be edited when displayed using any of the formats. Use the individual structure members individually to change any writable member.
Short Multi-Line (the default):
Long Multi-Line:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Related Instructions:
DEADBAND - Set Outside Deadband
INTEGRAT - Integrate Over Time
PID - Closed Loop Controller
PIDINIT - Set PID Tuning Constants
TIMEPROP - Time Proportional Control
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See Also:
Related Topics:Getting Started with PID Loops
Using the Do-more PID Process Simulator
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rung Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|