FB_VenetianBlindEx

FB_VenetianBlindEx 1:

Description

Four different methods are available for controlling the blind:

The tSwitchOverDeadTime can be used to prevent damage to the drive motor caused by immediate changes in direction. In most cases, this value is between 0.5 seconds and 1.0 seconds. The drive manufacturer can give you a precise value.

Safety position

Travel to the safety position (e.g. because there is a strong wind or because maintenance is being carried out at the window) can be achieved by setting the bSafetyPosition input. The output bBlindUp is set and the output bBlindDown reset for the period specified by tDriveTime + 10%. Operation of the blinds is prevented for as long as the bSafetyPosition input is active.

Shading position

Under conditions of above-average sunshine, the blinds can be moved to the shading position. After applying a positive edge to the input bShadowPosition, the blind is moved to the position nShadowSetPosition. The blind is then moved upwards again for the period of time specified by tShadowTurnAroundTime. This prevents the room from being completely darkened. If the blind had moved upwards during the approach of the shading position, it is moved downwards for the time period tDriveSwitchOverTime - tShadowTurnAroundTime. The same angle is therefore set as if the blind had moved down to darken.
When changing direction, a pause of the duration tSwitchOverDeadTime is observed. Travel to the shading position can be interrupted at any time by a new command.

FB_VenetianBlindEx 2:

The set shading time tShadowTurnAroundTime must never be longer than the time for the change of direction tDriveSwitchOverTime.

Moving to an absolute position

FB_VenetianBlindEx 3:

In most cases a blind will not provide feedback about its current position. Therefore, this can only be calculated via the travel time. The accuracy depends on the uniformity of the blind speed. Furthermore, the speed differences between opening and closing should be as small as possible.

The positions are always specified in percent. 0 % corresponds to fully up, 100 % to fully down. If a value greater than 100 is specified, it will be limited to 100 within the function block.

Determining the parameters

First, certain blind parameters have to be determined. The first one is the travel time, i.e. the time required for the blind to travel the complete distance. The second parameter is the time required for a change of direction. During a change of direction, the angle between the individual blades will change. The travel duration is transferred to the parameter tDriveTime, the duration of a change of direction to tDriveSwitchOverTime.

Referencing a block

Since the current position of the blind has to be calculated, inaccuracies during operation will accumulate. In order to limit deviations, the block will automatically reference itself as often as possible. This occurs when the blind is moved either fully up or fully down, and the appropriate output is reset automatically, i.e. after the time tDriveTime + 10% has passed.

VAR_INPUT

bUp                    : BOOL;
bDown                  : BOOL;
bStop                  : BOOL;
bSwitchOverUp          : BOOL;
bSwitchOverDown        : BOOL;
tSwitchOverTime        : TIME := t#500ms;
bStepUp                : BOOL;
bStepDown              : BOOL;
tStepTime              : TIME := t#200ms;
bPosition              : BOOL;
nSetPosition           : USINT;
bShadowPosition        : BOOL;
nShadowSetPosition     : USINT := 80;
tShadowTurnAroundTime  : TIME := t#0s;
bSafetyPosition        : BOOL;
tDriveTime             : TIME := t#60s;
tDriveSwitchOverTime   : TIME := t#200ms;
tSwitchOverDeadTime    : TIME := t#400ms;

bUp: Set the bBlindUp output and reset the bBlindDown output. The bBlindUp output remains latched.

bDown: Set the bBlindDown output and reset the bBlindUp output. The bBlindDown output remains latched.

bStop: Reset the bBlindUp and bBlindDown outputs.

bSwitchOverUp: Set the bBlindUp output and reset the bBlindDown output. If the signal remains present for longer than tSwitchOverTime, the output bBlindUp remains latched.

bSwitchOverDown: Set the bBlindDown output and reset the bBlindUp output. If the signal remains present for longer than tSwitchOverTime, the output bBlindDown remains latched.

tSwitchOverTime: Gives the time for which the bSwitchUp and bSwitchDown inputs must remain asserted before the outputs are latched. If the value is 0, the outputs are latched immediately.

bStepUp: Reset the bBlindDown output and set the bBlindUp output for the time tStepTime.

bStepDown: Reset the bBlindUp output and set the bBlindDown output for the time tStepTime.

tStepTime: If the blind is controlled through the bStepUp or bStepDown inputs, the outputs remain asserted for this period. The outputs are not set if the specified duration is 0.

bPosition: Move blind to specified position.

nSetPosition: Position (0%-100%) to which the blind is to be moved, after a rising edge has been applied to input bPosition. 0% corresponds to fully up, 100% corresponds to fully down.

bShadowPosition: The shading position is approached (see below).

nShadowSetPosition: Shading position (0%-100%) to which the blind is to be moved, after a rising edge has been applied to input bShadowPosition.

tShadowTurnAroundTime: Once the shading position has been reached, the blind is moved upwards for the period tShadowTurnAroundTime.

bSafetyPosition: The safety position is approached. To do this, the blind is raised for the period tDriveTime + 10%. It is not possible to operate the blinds while this input is set.

tDriveTime: Travel time of the blind from fully up to fully down. If no input is activated, the outputs are reset after the period tDriveTime + 10%. The outputs are not automatically reset if the specified duration is 0. In this case, the blind cannot be moved to absolute positions.

tDriveSwitchOverTime: Period required for a change of direction of the blind.

tSwitchOverDeadTime: Dwell time at a change of direction. Both outputs are reset during this period.

VAR_OUTPUT

bBlindUp         : BOOL;
bBlindDown       : BOOL;
nActualPosition  : USINT;
bCalibrated      : BOOL;

bBlindUp: The blind moves up.

bBlindDown: The blind moves down.

nActualPosition: Current position in percent.

bCalibrated: Specifies whether the blind is calibrated.