FB_BA_RolBldActr
This function block is used to position a roller shutter over two outputs: up and down. The positioning telegram stSunBld can be used to move the roller shutter to any position. In addition, the positioning telegram stSunBld offers manual commands, which can be used to move the roller shutter to particular positions. These manual commands are controlled by the function block FB_BA_SunBldSwi.
Structure of the blind positioning telegram stSunBld.
TYPE ST_BA_SunBld:
STRUCT
rPos : REAL;
rAngl : REAL;
bManUp : BOOL;
bManDwn : BOOL;
bManMod : BOOL;
bActv : BOOL;
END_STRUCT
END_TYPE
The current height position is not read in by an additional encoder; it is determined internally by the runtime of the roller shutter.
The two runtime parameters udiTiUp (roller shutter travel-up time [ms]) and udiTiDwn (roller shutter travel-down time [ms]) take account of the different movement characteristics.
As a rule, the function block controls the roller shutter based on the information from the positioning telegram stSunBld. If automatic mode is active (bManMod=FALSE), the roller shutter always moves to the current position; changes are reflected immediately. In manual mode (bManMod=TRUE), the roller shutter is controlled by the commands bManUp and bManDwn.
Referencing
Safe referencing refers to a situation when the roller shutter is upwards-controlled for longer than its complete travel-up time. The position is then always "0". Since roller shutter positioning without encoder is always error-prone, it is important to use automatic referencing whenever possible: Whenever "0" is specified as the target position, the roller shutter initially moves upwards normally, based on continuous position calculation. Once the calculated position value 0% is reached, the output bUp continues to be held for the complete travel-up time + 5s.
For reasons of flexibility there are now two possibilities to interrupt the referencing procedure: Until the calculated 0% position is reached, a change in position continues to be assumed and executed. Once this 0% position is reached, the roller shutter can still be moved with the manual "travel-down" command. These two sensible restrictions make it necessary for the user to ensure that the roller shutter is referenced safely whenever possible.
After a system restart, the function block executes a reference run. Completion of the initial referencing is indicated through a TRUE signal at output bInitRefCmpl. The initial referencing can also be terminated through a manual "travel-down" command.
VAR_INPUT
bEn : BOOL;
stSunBld : ST_BA_Sunblind;
udiTiUp_ms : UDINT;
udiTiDwn_ms : UDINT;
bEn: Enable input for the function block. As long as this input is TRUE, the actuator function block accepts and executes commands as described above. A FALSE signal on this input resets the control outputs bUp and bDwn and the function block remains in a state of rest.
stSunBld: Positioning telegram, see ST_BA_SunBld.
udiTiUp_ms: Complete time for driving up [ms].
udiTiDwn_ms: Complete time for driving down in ms.
bUp : BOOL;
bDwn : BOOL;
rActlPos : REAL;
bRef : BOOL;
udiRefTi_sec : UDINT;
bInitRefCompl : BOOL;
bBusy : BOOL;
bErr : BOOL;
sErrDescr : T_MAXSTRING;
bUp: Control output roller blind up.
bDwn: Control output roller blind down.
rActlPos: Current position in percent.
bRef: The roller blind is referencing, i.e. the output bUp is set for the complete travel-up time + 5 s. Only a manual "down" command can move the roller blind in the opposite direction and terminate this mode.
udiRefTi_sec: Referencing countdown display [s].
bInitRefCompl: Initial referencing process complete.
bBusy: A positioning or a referencing procedure is in progress.
bErr: This output is switched to TRUE if the parameters entered are erroneous.
sErrDescr: Contains the error description.
Error description |
---|
01: Error: The total travel-up or travel-down time (udiTiUp_ms/udiTiDwn_ms) is zero. |
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4024.7 | Tc3_BA from v1.1.6.0 |