PDA

View Full Version : PAC PIR Settings


Clinton's Electrical
05 Nov 08, 06:36 AM
Hi All. i Should be Getting A PAC Next Week After My Minder Mk2 Got Hit By Lightning. I Had Simple Logic Programmed Where i Woudl use A Dummy GA (PIR Lounge) And use If PIR Lounge Is On Dim Lounge Lights To 70%. All Fine
Then If PIR Lounge is Off, Delay For 5 Mins Then set Lounge Lights To 50%
Then If PIR Lounge is Off, Delay For 7 Mins Then set Lounge Lights To 0%
Could this be Done With PAC? As I Have Played With Piced For the PAC. And Have Programmed A Touch Screen Fine With The Software before But Not With Logic. Pool Timer Function And Set Outside Lights With Light Level Switch, Sounds And looks easy But the PIR... Not So Sure. Anyone Else Done Similar.?
Thanks For the Help So Far.
:D

Darren
05 Nov 08, 09:32 AM
This should be easy enough with a PAC. If I correctly understand what you require, this will do what you want:

once GetLightingState("PIR Lounge") then
begin
SetLightingLevel("Lounge Lights", 70%, "0s");
end;

if ConditionStaysTrue(GetLightingState("PIR Lounge") = OFF, "0:05:00") then
begin
SetLightingLevel("Lounge Lights", 50%, "4s");
end;

if ConditionStaysTrue(GetLightingState("PIR Lounge") = OFF, "0:07:00") then
begin
SetLightingLevel("Lounge Lights", 0%, "4s");
end;

Clinton's Electrical
06 Nov 08, 01:48 AM
Darren, Thanks For the help. The Code Looks Differnet From the Older minder If,thenAnd etc. But Thanks For the Prompt Reply i Would Like to Create A GA For The PIR Motion 100% And a GA For 30% ( After midnight For Those Refridgerator Raids. He he ) But As Asoon As i Have th Unt i Will play:rolleyes:
Thanks For the Assistance So Far..

Lucky555
06 Nov 08, 08:09 PM
"if ConditionStaysTrue" - that's brilliant - so much better than "ignore" which doesn't make any sense at all... :D :D :D

edit - "ignore" which doesn't make any sense at all, to a very intelligent person :D

Clinton's Electrical
07 Nov 08, 04:10 AM
I Still Have To Learn All these If Condition... Ignore,, Stuff. Very Good to See Humour here..:cool:

Lucky555
07 Nov 08, 10:30 PM
I Still Have To Learn All these If Condition... Ignore,, Stuff. Very Good to See Humour here..:cool:

Stick with Piced (pronounced pick - ed) and C-Bus logic. If you have any areas of confusion read the help files, they are excellent.

I'm self taught and I'm not very clever.......... Shut up PSC...

P.S. What's with the :cool: ?

P.S.S. Drop the code that Darren wrote above into your Pick ed (PAC) program module and it will do exactly what you have described (provided the tags line up). Looks like that Darren kid should get a job at CIS... He would be handy around there. :D

Clinton's Electrical
02 Dec 08, 07:15 AM
Thanks Lucky Sorry For The Long Delay. But Having Fun With PAC. Greates C-Bus Product Since.... Er Well Since 2000.. im Also Learing So Far . A Few Blackouts From Master off Settings And Wife Screaming C- Busted !! But Yeah Good Fun...

Lucky555
02 Dec 08, 08:48 PM
Thanks Lucky Sorry For The Long Delay. But Having Fun With PAC. Greates C-Bus Product Since.... Er Well Since 2000.. im Also Learing So Far . A Few Blackouts From Master off Settings And Wife Screaming C- Busted !! But Yeah Good Fun...


If you are triggering "master off's" from buttons on key inputs around the place eg, GoodNight, GoodBye etc, after much trial and error try this arrangement with your C-Bus and Pick ed (PICED) programming.

Make your button a timer function - toggle - and say 20 seconds time. Put a group address on the button that will be recognised by the PAC / C-Touch etc and used to trigger your GoodNight, GoodBye scene - let's call the group Trig Goodnight. In your logic code use the if ConditionStaysTrue funtion to see if the "Trig Goodnight" group address stays on for 10 seconds. If true SetScene "Goodnight" and set the "Trig Goodnight" group to "OFF"

What do you get from all of this ? - I'm glad you asked...

The GoodNight button flashes to show the timer function, if it was not what the user intended they have 10 seconds to press the button again - no harm done - no wife screaming at you...

When going to bed it is really cool to have a 10 second delay so you can jump into bed, pull the covers up nice and high then have all the lights slowly ramp off.

If the timer function on the button runs past 10 seconds, your PAC / CTouch is off line or you have written some bodgie code and you have a runtime error. :p :p :p

Havng said that, these days (don't program much these days) I am sure even after a runtime error you can get the logic engine to auto restart.. Would love to meet the person responsible for such a brilliant platform...