FB_VenetianBlind
There are three different ways in which the blinds may be controlled:
- A positive edge at the bUp or bDown inputs set the bBlindUp or bBlindDown outputs respectively. These remain asserted until the time tTurnOffTime has elapsed, or until the function block receives some other command. Both outputs are immediately reset by a positive edge at the bStop input.
- Static signals are provided to the bSwitchOverUp or bSwitchOverDown inputs (e.g. by buttons). These set the bBlindUp and bBlindDown outputs. If this signal is asserted for longer than tSwitchOverTime, the outputs are latched. This means that the outputs will continue to be asserted, even if the signals at the inputs are removed again. In most cases, a value of 500 ms is sufficient for the tSwitchOverTime parameter. However, the output only remains asserted for the time tTurnOffTime, or until a new command is given to the function block.
- This last variation can be useful if the user wants to alter the setting of the blind step by step. Each positive 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.
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 s and 1.0 s. 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 tTurnOffTime. 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 presenting a positive edge to the bShadowPosition input, the blinds are lowered for the period of time specified by tShadowTurnOffTime. The blind is then moved upwards again for the period of time specified by tShadowTurnAroundTime. A time of about 2 seconds is usually set for this. This prevents the room from being completely darkened. 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.
VAR_INPUT
bUp : BOOL;
bDown : BOOL;
bStop : BOOL;
bSwitchOverUp : BOOL;
bSwitchOverDown : BOOL;
tSwitchOverTime : TIME := t#500ms;
bStepUp : BOOL;
bStepDown : BOOL;
tStepTime : TIME := t#200ms;
bShadowPosition : BOOL;
tShadowTurnAroundTime : TIME := t#0s;
tShadowTurnOffTime : TIME := t#20s;
bSafetyPosition : BOOL;
tTurnOffTime : TIME := t#60s;
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 of time. The outputs are not set if the specified duration is 0.
bShadowPosition: The shading position is approached.
tShadowTurnAroundTime: The blind travels in the opposite direction for the period of time specified by tShadowTurnAroundTime after the shading position has been reached.
tShadowTurnOffTime: The time for which the bBlindDown output is set in order to reach the shading position. A time of greater than 0 is necessary for the shading position to be approached.
bSafetyPosition: The safety position is approached. To do this, the blind is raised for the period of time specified by tTurnOffTime. It is not possible to operate the blinds while this input is set.
tTurnOffTime: If no input is activated, then the outputs are reset after this period of time. The outputs are not automatically reset if the specified duration is 0. The value given here should be about 10% larger than the travel time that is actually measured.
tSwitchOverDeadTime: Dwell time at a change of direction. Both outputs are reset during this period.
VAR_OUTPUT
bBlindUp : BOOL;
bBlindDown : BOOL;
bBlindUp: The blind opens.
bBlindDown: The blind closes.
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4020.32 | Tc2_BABasic from v3.1.0.0 |