ControlPI (FB)¶
FUNCTION_BLOCK ControlPI
Functional Description¶
Proportional integral acting controller (PI controller)The direction of the action (inverted / direct) is also adjustable.Typical application: Controlled systems with actuators that do not have a storage character.
Portrayal¶
Interfaces¶
Inputs¶
Name Datatype
Range
Init-Value
Function
rX REAL Analog actual value
rW REAL Analog setpoint
xEn BOOL Enable the controller
Outputs¶
Name Datatype
Range
Init-Value
Function
rY REAL 0.0 Output signal of the controller
rDiff REAL Control deviation
rPartP REAL proportional component at output signal
rPartI REAL Integral term at output signal
xLimitActive BOOL Status - Exceeding the limit value
Setpoints / Parameters¶
Name Datatype
Range
Init-Value
Function
rMax REAL 100.0 Upper absolute limit value of the output signal
rMin REAL 0.0 Lower absolute limit value of the output signal
rTn REAL 0.0 ... 200.0 Reset time time in seconds
rKp REAL 0.0 ... 2.0 Gain factor
rOffset REAL 0.0 Offset
rInitValue REAL 0.0 initialization value for the output signal
rYDisabled REAL 0.0 Switch-off value
eAction eControlMode eControlMode.Inverted Direction of action of the controller (inverted, direct)
eManModeN eManNum eManNum.Auto Operating mode for the controller output signal
rManValue REAL Output signal in manual mode
Functional Description¶
General¶
Controlling / Properties - reset time rTn
eAction Control deviation
Function
eControlMode.Inverted
rW - ( rx + rOffset ) Direction of action - Inverted
eControlMode.Direct rX - ( rW + rOffset ) Direction of action - direct
Integral part¶
Enabling input xEN¶
Restart of the controller¶
Control deviation rDiff¶
Proportional part at the signal output rPartP¶
Integral part at the signal output rPartl¶
Absolute rMin and rMax limits¶
Status - limit exceeded xLimitActive¶
Operating mode for the output signal of the eManModeN controller¶
eManModeN rY Function
eManNum.Auto Signal according to the formula / switch-off value
Automatic operation - Output signal
eManNum.Man rManValue Manual operation - Output signal
Visualization¶
Information¶
Element Authors
Date
Version Notes
Function
Adam Bartod 03.2017 1.0 Initial version
Programming
Adam Bartod 03.2017 1.0 Initial version
Test Jochen Reu 11.2017 1.0 Initial version
Documentation
Jochen Reu 11.2017 1.0 Initial version
Codesys¶
- InOut:
Scope Name Type Initial Comment Input rX REAL Analog actual value
rW REAL Analog setpoint
xEn BOOL Enable the controller
rYMax REAL 100 Upper absolute limit value of the output signal
rYMin REAL 0 Lower absolute limit value of the output signal
rTn REAL 200 Reset time time in seconds
rKp REAL 2 Gain factor
rOffset REAL 0 Offset
rInitValue REAL 0 initialization value for the output signal
rYDisabled REAL 0 Switch-off value
eAction eControlMode eControlMode.Inverted Direction of action of the controller (inverted, direct)
eManModeN eManNum eManNum.Auto Operating mode for the controller output signal
rManValue REAL Output signal in manual mode
Output rY REAL 0 Output signal of the controller
rDiff REAL Control deviation
rPartP REAL proportional component at output signal
rPartI REAL Integral term at output signal
xLimitAktiv BOOL Status - Exceeding the limit value