FB_VenetianBlindEx1Switch
Description
Function-block with the same functionality as FB_VenetianBlindEx() but with only one input bSwitch to operate the blind.
Four different methods are available for controlling the blind:
- A rising edge at the bUp or bDown inputs set the bBlindUp or bBlindDown outputs respectively. These remain asserted until the time tDriveTime + 10% has elapsed, or until the block receives some other command. Both outputs are immediately reset by a positive edge at the bStop input.
- With the input bSwitch, which is normally connected to a pushbutton, it is possible to drive the blind up and down. In contrast to FB_VenetianBlindEx() the specific output will be latched immediately. If operated in short succession, the functionality of bSwich will change from driving to stopping to driving in the opposite direction to stopping and to driving again. However, the output only remains asserted for the time tDriveTime + 10%, or until a new command is given to the function block.
- In certain applications it may be useful for the operator to be able to alter the blind position step by step. Each rising edge at the bStepUp or bStepDown inputs sets the corresponding output for the time tStepTime. A value of 200 ms has been found effective for tStepTime.
- Unlike the FB_VenetianBlind() block, this block also enables movement to an absolute position. A percentage value is applied to input nSetPosition, and subsequently a rising edge is applied to input bPosition.
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 rising edge to the input bShadowPosition, the blind is moved to the position nShadowSetPosition. The blinds are then taken up again for the period 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 period tDriveSwitchOverTime - tShadowTurnAroundTime. The same angle will therefore be set as if the blind had been moved downwards for darkening purposes.
During a change of direction, a pause of duration tSwitchOverDeadTime is maintained. Travel to the shading position can be interrupted at any time by a new command.
Moving to an absolute position
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;
bSwitch : BOOL;
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.
bSwitch: Control input to drive the blind up and down. In contrast to FB_VenetianBlindEx() the specific output will be latched immediately. If operated in short succession, the functionality of bSwich will change from driving to stopping to driving in the opposite direction to stopping and to driving again.
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 of time 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.