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

Execute

BOOL

FALSE

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.

Sp

INT

0

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

CvAdapt

REAL

0

3: Reference to process used for autotune, issued when output CvOn is activated

Pv

INT

0

4: Process value, actual value of the controlled variable, example actual temperature

Cv

REAL

0

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

SetItg

BOOL

FALSE

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

CvOnAllow

BOOL

FALSE

7: Enable the output CvOn to be positive, Used to Synchornize several Adapt in case of SetItg =FALSE, use TRUE otherwise.

CvOffAllow

BOOL

FALSE

8: Enable the output CvOn to be negative, Used to synchronize several Adapt in case OptCool=TRUE, use TRUE otherwise

OptCool

BOOL

FALSE

9: Enables identification for cooling behavior. Measure the influence of “CoolFact” output, if active cooling is available

Resolution

WORD

0

10: Resolution for analog value (Pv), eg 4096 with 12 Bit, value is always < Range

Range

WORD

0

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

Done

BOOL

FALSE

1: Ready message. TRUE means the autotune has been succesfully executed.

Error

BOOL

FALSE

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.

ErrorID

ERROR_ID

3: Error code in case of error in the function block execut.

Warning

WARNING_ID

4: 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.

CvOn

REAL

0

5: Control value for process, to be checked during autotune. Value to switch on the control variable to +/- CvAdapt.

CvOnRequest

BOOL

FALSE

6: Requires allowance to switch on.It is used to synchronize several adapt in case SetItg=FALSE, ignore otherwise.

CvOffRequest

BOOL

FALSE

7: Requires allowance to switch on.It is used to synchronize several adapt in case SetItg=FALSE, ignore otherwise.

InitCv

REAL

0

8: Offset for controller, assumed value for control variable to reach Sp, just valid when SetItg=FALSE

CtrlKp

REAL

0

9: Proportional gain, recommendation for parameters for Pidt1

CtrlTiCycles

REAL

0

10: Integration time, scaled to the scan time, recommendation for parameters for Pidt1

CtrlTdCycles

REAL

0

11: Derivative time, scaled to the scan time, recommendation for parameters for Pidt1

CtrlT1Cycles

REAL

0

12: Filter time for derivative controller (equals parameter T1 at Pidt1), recommendation for parameters for Pidt1

UsedItg

BOOL

FALSE

13: Parameters were calculated based on integral behavior of plant

Ks

REAL

0

14: Measured gain

Tu

REAL

0

15: Measured delay time

Tg

REAL

0

16: Measured integration time

CoolFact

REAL

1

17: Recommended additional gain for cooling, is just valid when OptCool=TRUE

Structure: