Programming, is this right

pyton

New member
This has worked for a bit but now I am adding a new command. Since I run a kalk reactor and if the pump is ON I do not want the ATO to run at the same time. In fact if there is a way to tell the ATO to defer 5 minutes after the Kalk_Reactor ran that would be great.

This is what I got so far

Fallback OFF
If Switch1 OPEN Then OFF
If Switch1 CLOSED Then ON
If Switch2 CLOSED Then OFF
If Outlet Kalk_Reactor = ON Then OFF
Min Time 015:00 Then OFF

Is it possible to have it defer for 5 minutes after the Kalk_Reactor pump has turned off?
Is there a better way to write this command?
 
What you have now should accomplish what you want. If Kalk is ON and ATO OFF, once Kalk changes to OFF, then ATO will stay OFF for at least 15 minutes before Switch1 can change it to ON.

Todd
 
Actually the

Code:
Min Time 015:00 Then OFF

Will only keep the Outlet of the ato from turning on and off more than once per 15 minutes. You would need to put a Defer statment in there to keep it from starting the outlet right after the kalk reactor is set to off.

So if you do a random OSC command that runs your kalk reactor say 5 minutes every 255 minutes. You do not know when the kalk would turn on but you know it turns on for 5 minutes.

Put a defer statement of 10 minutes so if right after the Kalk reactor turns on your float closes and wants to open the ato valve. If you tell it to defer for 10 minutes it will allow the kalk reactor to run for it's 5 minutes and wait another 5 to 6 minutes before it opens the valve to use the ato. Without the defer statement as soon as the kalk ractor turns off your valve will open so long as it was not within 15 minutes of the last time the valve opened.

example:
Code:
Fallback OFF 
If Switch1 OPEN Then OFF 
If Switch1 CLOSED Then ON 
If Switch2 CLOSED Then OFF 
If Outlet Kalk_Reactor = ON Then OFF 
Defer 010:00 Then ON 
Min Time 015:00 Then OFF


Hope that makes sense.
 
Yup, missed the fact that Kalk = ON could be true for more than 15 minutes, which would satisfy the Min Time condition. Actually, you don't even need the Min Time if you use Defer as SpecialTang suggested.

Fallback OFF
If Switch1 OPEN Then OFF
If Switch1 CLOSED Then ON
If Switch2 CLOSED Then OFF
If Outlet Kalk_Reactor = ON Then OFF
Defer 05:00 Then ON

This will delay the ATO for five minutes before Switch1 can turn it back ON, regardless of which condition turned it OFF.

Todd
 
Back
Top