PDA

View Full Version : operating a fan with delayed turnoff


Neil C
07 Nov 07, 11:37 PM
I need to provide a function using C-bus, which is probably a common requirement, in that I need to power on a bathroom fan when a light is switched on. Then when the bathroom lights are extinguished, the fan needs to run for several minutes before it is turned off. The lights will be connected to a c-bus dimmer, and the fan to a c-bus relay.

As there is a PAC on this installation, I thought that one way around this might be to write some custom code using this. Does anybody have any ideas or examples on how to go about this?

Alternatively, can anybody suggest another way around this problem? There isn't a touch screen on this system, but if one was installed, could this be somehow programmed to provide the function necessary?

Thanks

amberelectrics
08 Nov 07, 06:56 AM
There is example code included in toolkit 1.7.2

Its really easy to implement on a PAC and the example code should give you a good start, just customise the delays to suit.

Custom
08 Nov 07, 08:12 AM
There is a good example in Piced 4 > Projects > Examples > Logic > Toilet Fan.

Cheers

znelbok
08 Nov 07, 09:11 AM
This was covered in the old V2 manual (run on timer). It has been requested a few times here since toolkit has been introduced. A PAC is not required

Please do a search for more info

Mick

NickD
08 Nov 07, 10:32 AM
As Mick points out, you can achieve this with just the switch, and there is an example in the Toolkit help which explains this (search on "Bathroom Service").

However.. I have tried using this at home, and most people that have used it have commented that the 2 second the delay between pushing the light button and the light going off is quite disconcerting. You can't reduce this much, because it's hitting the limits of the timer resolution in the switch (Don may correct me here), and it can have unpredictable results (sometimes the light will turn itself back on).

It sounds a bit like overkill, but using the PAC may give you better results.

If you go the logic route, it would be pretty simple... the pseudo-code would be something like

once {bathroom light on}
{turn bathroom fan on}

once {bathroom light off}
{pulse fan group on for 5 minutes}

Nick

BookMaker
08 Nov 07, 10:37 AM
There is an example of what you want to program in Toolkit. Follow the steps to get to the example:
Click F1 to view Toolkit Help
Click on the Help Topics button, the Contents page appears in the Contents tab
Click on the Tutorials book
Click on 'Using timers within key input units'
Click on 'Control of lights and fans with timers'

Alternatively, use the Index tab and type: 'Control of lights and fans with timers'

Let me know if you can't find it.

TSI-Michael
30 Nov 07, 06:47 AM
I did the following a few months ago and have been using it very successfully since then. Create a Module (give it some meaningful name) and fill in your Tag names and times.

It turns the fan (Relay - R19_18) on if the lights (Dimmer - D18_17) stay above 75% for more than 2.5 minutes and then turns the fan off when the light goes off. The light is controlled by a PIR with a 2 minute off timer after last movement.

1 once (GetLightingLevel("Guest Bath D18_017") > 75%) then
2 begin
3 Delay("0:02:30");
4 if (GetLightingLevel("Guest Bath D18_017") > 75%) then
5 begin
6 SetLightingState("Guest Bath R19_018", ON);
7 end;
8 end;
9
10 once (GetLightingLevel("Guest Bath D18_017") = 0%) then
11 begin
12 SetLightingState("Guest Bath R19_018", OFF);
13 end;

I put lines 1 to 8 in one module and lines 10 to 13 in another.

I don't know for sure but I guess something similar would work in the PAC too.

Regards,
Michael

znelbok
30 Nov 07, 07:58 AM
However.. I have tried using this at home, and most people that have used it have commented that the 2 second the delay between pushing the light button and the light going off is quite disconcerting. You can't reduce this much, because it's hitting the limits of the timer resolution in the switch (Don may correct me here), and it can have unpredictable results (sometimes the light will turn itself back on).


I had this going for a while and never had any delay that I can remember, not did the light come back on.

I will have to dig out the old manual and set it up again.

I still believe the PAC is an overkill.

Mick