Adam McLeod
01 Dec 09, 09:30 PM
Hi all,
I have a question controlling 3 speed fan with a DLT switch.
Because you have no LED control with a DLT i thought it would be nice to be able to get the labels to change as to what speed setting the fan was currently on.
Each time the DLT button is pressed a new scene is triggered, starting at low, then, meduim, then high, then off.
Here is my logic attempt but i don't seem to be able to get it to work, can anyone help me out with this, cheers
My C-Bus switch is labelled "Bed 1 sweep fan control"
Constants:
net = 254;
app = 56;
Global Variables:
CounterFanBed1 : integer;
Initialisation:
CounterFanBed1 := 0;
SetIntIBSystemIO("Label Language",2);
once (GetLightingState("Bed 1 sweep fan control") = OFF) then
begin
CounterFanBed1 := CounterFanBed1 + 1;
SetLightingState("Bed 1 sweep fan control", ON);
case CounterFanBed1 of
0 : ;
1 : SetScene("Bedroom 1 Sweep Fan Low");
2 : SetScene("Bedroom 1 Sweep Fan Med");
3 : SetScene("Bedroom 1 Sweep Fan High");
4 : SetScene("Bedroom 1 Sweep Fan Off");
end
end;
if CounterFanBed1 >= 4 then
begin
CounterFanBed1 := 0;
end;
once CounterFanBed1 = 1 then
begin
SetStringIBSystemIO("Label Group Text", net, app, 157, 0, 'Fan Low');
end;
once CounterFanBed1 = 2 then
begin
SetStringIBSystemIO("Label Group Text", net, app, 157, 0, 'Fan Med');
end;
once CounterFanBed1 = 3 then
begin
SetStringIBSystemIO("Label Group Text", net, app, 157, 0, 'Fan High');
end;
once CounterFanBed1 = 4 then
begin
SetStringIBSystemIO("Label Group Text", net, app, 157, 0, 'Fan Off');
end
Cheers for your help
I have a question controlling 3 speed fan with a DLT switch.
Because you have no LED control with a DLT i thought it would be nice to be able to get the labels to change as to what speed setting the fan was currently on.
Each time the DLT button is pressed a new scene is triggered, starting at low, then, meduim, then high, then off.
Here is my logic attempt but i don't seem to be able to get it to work, can anyone help me out with this, cheers
My C-Bus switch is labelled "Bed 1 sweep fan control"
Constants:
net = 254;
app = 56;
Global Variables:
CounterFanBed1 : integer;
Initialisation:
CounterFanBed1 := 0;
SetIntIBSystemIO("Label Language",2);
once (GetLightingState("Bed 1 sweep fan control") = OFF) then
begin
CounterFanBed1 := CounterFanBed1 + 1;
SetLightingState("Bed 1 sweep fan control", ON);
case CounterFanBed1 of
0 : ;
1 : SetScene("Bedroom 1 Sweep Fan Low");
2 : SetScene("Bedroom 1 Sweep Fan Med");
3 : SetScene("Bedroom 1 Sweep Fan High");
4 : SetScene("Bedroom 1 Sweep Fan Off");
end
end;
if CounterFanBed1 >= 4 then
begin
CounterFanBed1 := 0;
end;
once CounterFanBed1 = 1 then
begin
SetStringIBSystemIO("Label Group Text", net, app, 157, 0, 'Fan Low');
end;
once CounterFanBed1 = 2 then
begin
SetStringIBSystemIO("Label Group Text", net, app, 157, 0, 'Fan Med');
end;
once CounterFanBed1 = 3 then
begin
SetStringIBSystemIO("Label Group Text", net, app, 157, 0, 'Fan High');
end;
once CounterFanBed1 = 4 then
begin
SetStringIBSystemIO("Label Group Text", net, app, 157, 0, 'Fan Off');
end
Cheers for your help