ValveThermo (FB)¶
FUNCTION_BLOCK ValveThermo IMPLEMENTS IValveContinuous
Thermal actuator valve.
Application example¶
Thermal actuator valves are widely used in building automation, are cost efficient but not very energy efficient and as precise as mechanical gear actuators.
Device examples¶
- Danfoss ABN A5 Actuator https://assets.danfoss.com/documents/71560/AI111186467687en-010301.pdf 
- Danfoss Thermal Actuator TWA-Z https://assets.danfoss.com/documents/86003/AI208386479940en-010201.pdf 
Functionality¶
Thermal actuator valves are mostly controlled by 2-point control or continuous control via pulse-width modulation (PWM). General purpose 2-point control or general purpose PWM doesnt take the specifics of thermal actuator valves into account, leading to sub-optimal control deviation and variance. Thermal actuator valves comes in two flavours - normally closed and normally open valves. Normally closed valves should be prefered whenever possible to optimize for control energy consumption.
ValveThermo provides an optimized control strategy for thermal actuator valves, improving control deviation and variance a bit.
ValveThermo takes into account:
- warmup needed after longish shutdown / cooldown (normally closed valves only) 
- inherent start delay (sometimes called “dead time”) 
- travel time 
- closing time including travel time plus closing delay (sometimes called “hold time”) 
Approximate value (taken from data sheet), guessed values or even default values for tStartDelay / tClose are often good enough. Opening / closing travel time are assumed to be alike. Warmup time and cooldown time are assumed to be alike.
The ValveThermo algorithm does a refined PWM with an cycle tPeriod, but scaling the valve setpoint in a time window (tPeriod - tStartDelay - tClose).
Normally closed valves and warmup:¶
If ValveThermo is in eWarmupState = IS_COLD, (warmup is enabled by setting usiWarmupCycles > 0) and rSetpt is set to a value > 0.0 there is a subsequent warmup phase. During warmup ValveThermo does the refined PWM mentioned above for usiWarmupCycles using rWarmupSetpt instead of rSetpt. Cooldown starts, if valve is supposed to close (rSetpt:=0), procceds usiWarmupCycles to end up in eWarmupState = IS_COLD. Warmup/cooldown can be disabled using usiWarmupCycles:=0.
ValveThermo doesnt do warmup/cooldown for normally open valves.
Blocking protection¶
If the valve is not opened for a given time tBpMaxOff, open it even if rSetpt = 0.0 for a given time tBpTime and the given position rBpPos.
- InOut:
- Scope - Name - Type - Initial - Comment - Input - xEnable- BOOL- TRUE - Enable - xNormallyClosed- BOOL- TRUE - Valve is normally closed (if no power is applied), but gets opened if power is applied. - rSetpt- REAL- 0.0 - Setpoint, 0..100(%) - 0% => closed, 100% => open - tPeriod- TIME- TIME#10m0s0ms - Pulse width modulation period - usiWarmupCycles- USINT- 1 - Warmup time in number of periods, to deactivate warmaup/cooldown use usiWarmupCycles:=0. - rWarmupSetpt- REAL- 50.0 - Warmup setpoint. - tStartDelay- TIME- TIME#1m0s0ms - Start delay after powering on. - tClose- TIME- TIME#3m0s0ms - Closing time after powering off. - tBpMaxOff- TIME- TIME#2880m0s0ms - Blocking protection maximum off time - tBpTime- TIME- TIME#0ms - Blocking protection time, set to T#0S to disable blocking protection - rBpPos- REAL- 100.0 - Blocking protection position, 0..100(%) - 0% => closed, 100% => open - xReset- BOOL- FALSE - Reset - itfDateTimeProvider- Util.IDateTimeProvider- Globals.g_dtpDateTimeProvider - Source for the current date and time information in milliseconds since 1.1.1970 00:00:00.000 - Output - xPWM- BOOL- Pulse width modulation - rSetptOut- REAL- Actual setpoint, either rSetpt or rWarmupSetpt - eWarmupState- ValveThermoWarmupState.IS_COLD - Warmup state - xError- BOOL- Error indication - eErrorID- Error ID - itfValveContinuous- Output to connect THIS to other function block inputs 
Properties:
Structure:
