Advanced(ish) programming help?

cr500_af

New member
I am in the process of setting up a new tank, and when I move my Apex over one of the things I'm hoping to accomplish is "mostly automated" water changes.

In a nutshell, I plan to use a pump to empty the return chamber of my sump, which will be turned off via a "low level" float switch. The new SW vessel will have its own pump, which will refill the sump until a second float switch signals the sump is full (this one set to the "return pump off" water level).

I do not want to do this while I'm away, in fact I want to set this process in motion via a momentary contact switch on my breakout box (similar to the doorbell switch scenario in the Guide) so that I must be standing in the equipment room to make it happen.

My question concerns how to make one action (pushing the button to make switch "X" closed) spawn two different actions on two different outlets (the two pumps) one after the other?

So it would proceed like this:
button pushed ( aka switch closed)
return pump off
wait (draindown time, predetermined)
pump one starts and runs until float switch A closed, then off
THEN
Pump two starts and runs until float switch B closed, then off
Return pump on

Any suggestions? I have plenty of time to play with it, but I have never seen an example of a routine making to things happen in sequence.
 
There are two basic approaches to a sequence. One is to have an initial trigger and then subsequent steps are independently time based. The second is to trigger subsequent steps from previous steps. You can also mix the two as needed. Anyway, here is first cut at the code, untested:

[Start]
Set OFF
If Switch1 CLOSED Then ON
Defer xxx Then OFF

[ReturnPump]
Set ON
If Outlet Start = ON Then OFF

[Pump_Out]
If Outlet Start = ON Then ON
If Switch2 = CLOSED Then OFF
Defer yyy Then ON

[Pump_In]
If Switch2 = CLOSED Then ON
If Switch3 = OPEN Then OFF

Switch1: button
Switch2: low float, CLOSED when DOWN
Switch3: high float, OPEN when UP

Sequence starts with the button press, [Start] turns ON and remains so for xxx minutes. [Return_Pump] shuts OFF for the duration of the sequence. [Pump_Out] is triggered by [Start] but delays yyy minutes before turning ON, then it turns OFF once the low float is CLOSED. That then triggers [Pump_In] to come ON, it will run until the high float is OPEN and sump is full. Ideally, [Pump_In] = OFF would end the sequence, but it is normally OFF and so would never allow things to start.

Todd
 
Thank you, that's a great help. I will mock it up with my extra EB8 sometime soon, and use lamps to visually see the on/off status of the various outlets.
I appreciate it!
 
One other thing... I will probably do the mid (skimmer) compartment of my sump when I do this since it contains a more appropriate volume of water for routine changes, so I'll need to kill the skimmer until the sequence is over. Would I just add a line to my skimmer's recirc pump and feed pump outlets as follows:

If outlet start = ON then OFF

Plus on the (external) recirc pump (so it does't start dry) add

Defer 005 then ON

This would keep both off until the sequence ends, plus put a five minute delay on the recirc pump restarting, right?
 
Back
Top