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
ACTUALREALActual value, process variable
SET_POINTREALDesired value, set point
KPREALProportionality const. P
TNREALReset time I in sec
TVREALRate time, derivative time D in sec
Y_MANUALREALYis set to this value as long asMANUAL=TRUEY_OFFSETREALOffset for manipulated variable
Y_MINREALMinimum value for manipulated variable
Y_MAXREALMaximum value for manipulated variable
MANUALBOOLTRUE:Manual:Yis not influenced by controllerFALSE: Controller determinesYRESETBOOLTRUE: SetsYoutput toY_OFFSETand reset integral partCYCLEREALTime in s between two calls
Output
YREALManipulated variable, set value
LIMITS_ACTIVEBOOLFALSE
TRUE: Set value would exceed limitsY_MIN,Y_MAXOVERFLOWBOOLFALSE
Overflow in integral part