PID_FIXCYCLE (FB)¶
FUNCTION_BLOCK PID_FIXCYCLE
Represents a PID controller for which the cycle time can be set manually
A PID controller continuously calculates an error value e(t) as the difference between a desired set point and a measured process variable. The PID contoller applies a correction based on proportional, integral, and derivative terms (sometimes denoted P, I, and D respectively) which give their name to the controller type.
Bemerkung
For fast and fix tasks it is recommended to use PID_FIXCYCLE instead of PID, because the cycle time is defined accurately, whereas PID only can measure the cycle time with a maximum accuracy of milliseconds. In case of very short cycles (1ms) this might lead to a rough run (see PID).
Bemerkung
It is not necessary to readjust the controller parameters (KP, TN, TV) if the cycle time changes.
For more information see: PID.
- InOut:
Scope
Name
Type
Initial
Comment
Input
ACTUAL
REAL
Actual value, process variable
SET_POINT
REAL
Desired value, set point
KP
REAL
Proportionality const. P
TN
REAL
Reset time I in sec
TV
REAL
Rate time, derivative time D in sec
Y_MANUAL
REAL
Y
is set to this value as long asMANUAL
=TRUE
Y_OFFSET
REAL
Offset for manipulated variable
Y_MIN
REAL
Minimum value for manipulated variable
Y_MAX
REAL
Maximum value for manipulated variable
MANUAL
BOOL
TRUE
:Manual
:Y
is not influenced by controllerFALSE
: Controller determinesY
RESET
BOOL
TRUE
: SetsY
output toY_OFFSET
and reset integral partCYCLE
REAL
Time in s between two calls
Output
Y
REAL
Manipulated variable, set value
LIMITS_ACTIVE
BOOL
FALSE
TRUE
: Set value would exceed limitsY_MIN
,Y_MAX
OVERFLOW
BOOL
FALSE
Overflow in integral part