View Full Version : Piced Logic with ignore
Can any one make some suggestions for me.
While writing some logic I have come accross the need for IGNORE commands such as we used to use with minder. Eg : If bla bla is on Ignore for 5min then do bla bla.
I havent figured out how to do this and if we can do this with piced?
Can any one make some suggestions for me.
While writing some logic I have come accross the need for IGNORE commands such as we used to use with minder. Eg : If bla bla is on Ignore for 5min then do bla bla.
I havent figured out how to do this and if we can do this with piced?
I'm not familiar with the product you mention. What do you mean by ignore? What is being ignored? Could you describe the behaviour.
rhamer
19 Aug 05, 02:13 PM
It's basically a delay.
For example
"if light is on ignore for 5 min then turn light off"
Means if the light is on wait 5 minutes and if it is still on then turn it off.
The other delay is
"if light is on delay for 5 min then turn light off"
Which means if the light goes on then wait 5 minutes and turn the light off regardless of what else has happened to the light in the mean time.
Darren
19 Aug 05, 03:50 PM
This can be implemented by using a delay then another test of the condition. For example :
once GetLightingState("Office 1") = OFF then
begin
Delay(20);
if GetLightingState("Office 1") = OFF then
SetLightingState("Corridor", OFF);
end;
Another way is to use a timer as follows :
once (GetLightingState("Office 1") = OFF) then
begin
TimerStart(1);
end;
once not (GetLightingState("Office 1") = OFF) then
begin
TimerStop(1);
end;
once TimerTime(1) = "0:00:20" then
begin
SetLightingState("Corridor", OFF);
TimerStop(1);
end;
This second method can be added to a module quickly by doing a right click and selecting Structures | Stay True Timer.
Eventually there will be a simpler method of doing this.
Dave Byron
19 Aug 05, 04:23 PM
Darren
can you put the above into the logic section as i am sure it will asked many times
dave
Phil.H
20 Aug 05, 05:17 PM
Darren
can you put the above into the logic section as i am sure it will asked many times
dave
Dave good question.
What do you think Darren ;)
Phil.H
20 Aug 05, 05:22 PM
This can be implemented by using a delay then another test of the condition. For example :
once GetLightingState("Office 1") = OFF then
begin
Delay(20);
if GetLightingState("Office 1") = OFF then
SetLightingState("Corridor", OFF);
end;
Another way is to use a timer as follows :
once (GetLightingState("Office 1") = OFF) then
begin
TimerStart(1);
end;
once not (GetLightingState("Office 1") = OFF) then
begin
TimerStop(1);
end;
once TimerTime(1) = "0:00:20" then
begin
SetLightingState("Corridor", OFF);
TimerStop(1);
end;
This second method can be added to a module quickly by doing a right click and selecting Structures | Stay True Timer.
Eventually there will be a simpler method of doing this.
once not ????
In the early days maybe the inverse of the original condition might be easier to understand.
{once (GetLightingState("Office 1") = ON) then}
Darren
22 Aug 05, 12:24 PM
An edited version of this is in http://www.cbusforums.com/forums/showthread.php?p=6843#post6843
vBulletin® v3.7.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.