Controlling the blinds gives our PLC a possiblity to earn a few points in the area of being an 'intelligent' installation. There is simply so much more that can be done with the blinds than with the lights or sockets.
In my house the blinds are controlled with simple wall-mounted switches, through a visualization and with a smartphone. Additionally they open/clos automatically depending on the time schedule and the times of sunset and sunrise.u słońca.
A simple blind-controlling program looks as follows:
VAR Blind1 : FbSunblind; END_VAR * * * Blind1(xSunblindSwitchUp:= IN1 OR VIS_Blind1_UP, xSunblindSwitchDown:=IN2 OR VIS_Blind1_DN); OUT1:=Blind1.xDoSunblindUp; OUT2:=Blind1.xDoSunblindDown;
where:
The above-presented code can be extended and modified by:
So, for xeample:
VAR RETAIN PERSISTENT Blind1 : FbSunblind:=( uiT_WholePosTimeIn10telSec:=300, uiT_MoveShadowPosIn10telSec:=100); END_VAR * * * Blind1( xSunblindSwitchUp:= IN1 OR VIS_Blind1_UP OR Timer_Blind1_UP OR Sunrise_Signal, xSunblindSwitchDown:=IN2 OR VIS_Blind1_DN OR Timer_Blind1_DN OR Sunset_Signal ); OUT1:=Blind1.xDoSunblindUp; OUT2:=Blind1.xDoSunblindDown;
where:
The visualization example presented below shows such a functionality. At the very top you can see the position of the sun. One can set the thresholds at which the blinds should act (move up, if the sun rises above the position -7° and to move down, if the sun sets below -6° from the horizon). For each of the movement: up and down it is possible to set if it should be triggered according to the schedule (clock), according to sun position or only manually. In the example below the blinds will move up at 06:55 on weekdays and at 08:00 on weekends, and they will move down at the moment of (corrected) sunset.
More complex functions related to blind control have been described in the article: Blind control with OSCAT libraries.