AdCtrlAdapt (FB)
FUNCTION_BLOCK AdCtrlAdapt
This Function Block takes care of the auto tuning algorithm. This block measures the process parameter and gives a proposal for the Pidt1 parameters Ks,Tu and Tg.
Adapt with additional Cooling identification: The cooling is identified by a 2-step control cycle with a hysteresis of 0.005*Range.
- InOut:
Scope
Name
Type
Initial
Comment
Input
ExecuteBOOLFALSE
- 1: Start the “Adapt” or autotune functionality.
When input is TRUE, the adapt functionality execution starts.
When input is FALSE, the adapt functionality execution stops running.
SpINT0
2: Setpoint value to be used for adaption (Auto tune), equals to the reference temperature, Adapt / Auto tune stops when reaching 0.8*(Sp-Pv)+Pv
CvAdaptREAL0
3: Reference to process used for autotune, issued when output CvOn is activated
PvINT0
4: Process value, actual value of the controlled variable, example actual temperature
CvREAL0
5: Actual value of control variable when adapt / auto tune starts,usually equals to zero, Cv and Pv characterisizes a steady state when adaption starts
SetItgBOOLFALSE
- 6: Assume integral behavior, use when the temperature rise does not show a point of inflexion
TRUE = Process with dominating integrating behaviour
FALSE = Process with proportional behaviour
CvOnAllowBOOLFALSE
7: Enable the output CvOn to be positive, Used to Synchornize several Adapt in case of SetItg =FALSE, use TRUE otherwise.
CvOffAllowBOOLFALSE
8: Enable the output CvOn to be negative, Used to synchronize several Adapt in case OptCool=TRUE, use TRUE otherwise
OptCoolBOOLFALSE
9: Enables identification for cooling behavior. Measure the influence of “CoolFact” output, if active cooling is available
ResolutionWORD0
10: Resolution for analog value (Pv), eg 4096 with 12 Bit, value is always < Range
RangeWORD0
11: Area for analog value (Pv) e.g 32767 when the values are streched to the complete INT-area or: 4000 when a temperature range of 400° 1/10 resolution is measured
Output
DoneBOOLFALSE
1: Ready message. TRUE means the autotune has been succesfully executed.
ErrorBOOLFALSE
2: Operation is stopped with error. This output is TRUE for at least one cycle or until Execute is set to FALSE. The output ErrorID gives more details about the error.
ErrorID3: Error code in case of error in the function block execut.
Warning4: Warning after end of adapt process.Tuning has been successful but check the warning. If warning < 0: the identified values might be outside the assumed optimal result.
CvOnREAL0
5: Control value for process, to be checked during autotune. Value to switch on the control variable to +/- CvAdapt.
CvOnRequestBOOLFALSE
6: Requires allowance to switch on.It is used to synchronize several adapt in case SetItg=FALSE, ignore otherwise.
CvOffRequestBOOLFALSE
7: Requires allowance to switch on.It is used to synchronize several adapt in case SetItg=FALSE, ignore otherwise.
InitCvREAL0
8: Offset for controller, assumed value for control variable to reach Sp, just valid when SetItg=FALSE
CtrlKpREAL0
9: Proportional gain, recommendation for parameters for Pidt1
CtrlTiCyclesREAL0
10: Integration time, scaled to the scan time, recommendation for parameters for Pidt1
CtrlTdCyclesREAL0
11: Derivative time, scaled to the scan time, recommendation for parameters for Pidt1
CtrlT1CyclesREAL0
12: Filter time for derivative controller (equals parameter T1 at Pidt1), recommendation for parameters for Pidt1
UsedItgBOOLFALSE
13: Parameters were calculated based on integral behavior of plant
KsREAL0
14: Measured gain
TuREAL0
15: Measured delay time
TgREAL0
16: Measured integration time
CoolFactREAL1
17: Recommended additional gain for cooling, is just valid when OptCool=TRUE
Structure: