FB_BA_SunBldTwiLgtAuto

FB_BA_SunBldTwiLgtAuto 1:

The function block FB_BA_SunBldTwiLgtAuto controls the blind when the outdoor brightness has fallen below a limit value.

The twilight automatic works with a value and a time hysteresis: If the outdoor brightness value fBrtns [lx] falls below the value fActvVal [lx] for the time nActvDly [s], then the function block is active and will provide the blind positions fPosTwiLgt (height [%]) and fAnglTwiLgt (slat angle [°]) specified at the input variables at the output in the positioning telegram ST_BA_Sunbld. Conversely, if the outdoor brightness exceeds the value fDctvVal[lx] for the time nDctvDly [s], the automatic function is no longer active. The active flag in the positioning telegram ST_BA_Sunbld is reset and the positions for height and angle are set to "0". A function with a lower priority can then take over control.

FB_BA_SunBldTwiLgtAuto 2: Inputs

VAR_INPUT
  bEn             : BOOL;
  fBrtns          : REAL;
  fActvVal        : REAL;
  fDctvVal        : REAL;
  nActvDly        : UDINT;
  nDctvDly        : UDINT;
  fPosTwiLgt      : REAL;
  fAnglTwiLgt     : REAL;
END_VAR

Name

Type

Description

bEn

BOOL

The function block has no function if this input is FALSE. 0 is output for the position and the angle in the positioning telegram ST_BA_SunBld - bManMod and bActv are set to FALSE. This means that another function takes over control of the blind via the priority controller. Conversely, a direct connection allows the blind to drive directly to the 0 position, i.e. fully up, since the actuator function block does not evaluate the bit bActv itself.

fBrtns

REAL

Outdoor brightness [lx].

fActvVal

REAL

Activation limit value [lx]. The value fActvVal is internally limited to values from 0 to fDctvVal.

fDctvVal

REAL

Deactivation limit value [lx]. Internally limited to a minimum value of 0.

nActvDly

UDINT

Activation delay [s]. Internally limited to a minimum value of 0.

nDctvDly

UDINT

Deactivation delay [s]. Internally limited to a minimum value of 0.

fPosTwiLgt

REAL

Vertical position of the blind [%] if the twilight automatic is active. Internally limited to values between 0 and 100.

fAnglTwiLgt

REAL

Lamella angle of the blind [°] if the twilight automatic is active

FB_BA_SunBldTwiLgtAuto 3: Inputs CONSTANT PERSISTENT

VAR_INPUT CONSTANT PERSISTENT
  ePrio    : E_BA_SunBldPrio := E_BA_SunBldPrio.eGroupTwiLightAuto;
END_VAR

Name

Type

Description

ePrio

E_BA_SunBldPrio

Priority of the active telegram.

FB_BA_SunBldTwiLgtAuto 4: Outputs

VAR_OUTPUT
  stSunBld          : ST_BA_SunBld;
  bActv             : BOOL;
  nRemTiActv        : UDINT;
  nRemTiDctv        : UDINT;
END_VAR

Name

Type

Description

stSunBld

ST_BA_SunBld

Output telegram, for the position and angle of the lamella.

bActv

BOOL

Corresponds to the boolean value bActv in the blind telegram ST_BA_SunBld and is solely used to indicate whether the function block sends an active telegram.

nRemTiActv

UDINT

Shows the time remaining [s] after falling below the switch value fActvVal until automatic mode is activated. This output is 0 as long as no countdown of the time is taking place.

nRemTiDctv

UDINT

Shows the time remaining [s] after exceeding of the switch value fDctvVal until automatic mode is disabled. This output is 0 as long as no countdown of the time is taking place.

FB_BA_SunBldTwiLgtAuto 5:

If an error occurs, this automatic control is disabled and the position and angle are set to 0. This means that if a priority controller is in use, another function with a lower priority (see Overview) automatically takes over control of the blind. In the case of a direct connection, conversely, the blind will drive to position/angle 0.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.22

Tc3_BA2 from v5.2.5.0