Example: IPIDController with auto-tune
The following example program shows the variables used to configure the parameters for auto-tuning.
IPIDController with auto-tune

Auto-tune parameters
The following table describes the variables that are used with each parameter in the example to configure auto-tuning.
Input Parameters | ||
---|---|---|
Variable | Parameter | Description |
AutoMode | Auto | The operation mode of the PID controller:
|
Initialize | Initialize | Initializes AutoTune sequence. A change in value from TRUE to FALSE or FALSE to TRUE causes the controller to eliminate any proportional gain during the cycle. |
My_Gains | Gains | Establishes the Gains PID for IPIDController. |
My_Gains.DirectActing | DirectActing | Defines the type of acting for the output.
|
My_Gains.ProportionalGain | ProportionalGain | Proportional gain for PID (>= 0.0001). |
My_Gains.TimeIntegral | TimeIntegral | Time integral value for PID (>= 0.0001). The tendency for oscillation increases with a decrease in ti. |
My_Gains.TimeDerivative | TimeDerivative | Time derivative value for PID (> 0.0). Damping increases with an increase in derivative time, but decreases if the derivative time value is too large. |
My_Gains.DerivativeGain | Derivative gain for PID (> 0.0). | |
AutoTune | When set to TRUE and Auto and Initialize are FALSE, the AutoTune sequence is started. | |
ATParameters | ||
Load |
| |
Deviation |
| |
Step | The auto-tune process considers how the process value reacts to the changes in step value and derives the Gain parameters. | |
ATDynaSet |
| |
ATReset |
| |
Output parameters | ||
AbsoluteError | Absolute error (Process – SetPoint) from the controller. | |
ATWarning | Warning for the Auto Tune sequence. Possible values are:
| |
OutGains | Gains calculated after AutoTune sequences. |
Provide Feedback