Controls the output using a PID (Proportional, Integral, Derivative) control loop, according to the following formulae:
The error is computed by subtracting the monitored value from the setpoint:
If the block is direct acting, the output control variable is computed based on the formula:
If the block is reverse acting, the output control variable is computed based on the formula:
PID controllers are too large a subject to be discussed here. As a suggestion, see: http://en.wikipedia.org/wiki/PID_controller
Inputs





Slots

Type

Default

Description


In

Numeric

0.0

The monitored value


Setpoint

Numeric

0.0

The reference value guiding the PID loop. That is, the desired value of the monitored variable.


Enabled

Digital

True

Enables or disables the block. When False, the output of the block is not updated, and remains at the last computed value.

Outputs



Slots

Type

Description


Out

Numeric

The output control signal calculated by the block.


ErrorSum

Numeric

(Hidden by default) Used during debugging to show the current state of the integral term of the block.
You can right click on the block while debugging to adjust some of the parameters of the block while it is operating.

Properties


Slots

Description


Kp

The proportional scaling factor (see formulae above).


Ki

The integral scaling factor (see formulae above).


Kd

The derivative scaling factor (see formulae above).


Max

The maximum value to which the output is limited.


Min

The minimum value to which the output is limited.


Direct

True for direct acting, False for Reverse Acting.


Bias

If Ki is equal to zero, specifies a fixed offset that will be added to the controlled output.


Deadband

When the error is within the deadband, the blocks acts as if the error is zero.
The deadband extends above and below the setpoint. That is the deadband range equals twice the deadband setting. For example: If the setpoint was 20°C and the deadband was 1°C, then the deadband range could be stated as 20±1°C, or as ranging from 19 to 21°C.


ExecuteTime

The time (in milliseconds) between calculations of the loop.

