Need code for return pump when I push feed button

Yates273

Valuable Member
View Badges
Joined
Jun 1, 2018
Messages
1,632
Reaction score
1,178
Location
NJ
Rating - 0%
0   0   0
Does anyone know how to code my return pump so when I hit the feed button on my breakout box or when my pump shuts down totally every night to feed Reef Energy it doesn’t totally shut off. I just want it to slow down to prevent the back siphon. I also recently installed a Uv and I would like to just keep that on by allowing the return pump to stay on just enough to keep water from draining out of it. I currently have the Uv turn off every time my return pump shuts off using my apex programming but I know this will shorten my bulb life. Thanks
 
What kind of pump is it, and is it capable of variable speeds? If so, then just tell it the percentage to run:

If FeedA 000 Then 1

or

If Button CLOSED Then 1

See this FAQ about using percentages in Apex programming:
 
Oh geez that was easy thanks!! It’s a Coralbox DCA9000 it does has variable speed. I will try this out to see. I guess same goes for programming on the pump. % would go on line 12 for when pump shuts down at night

BCC96A7E-E908-41E2-A6B2-A25FA9579672.png
 
IDK if you've considered it but if you put a hole in the return just above the waterline inside the tank it will prevent a siphon. I've done this with both of my tanks so I don't ever have to worry about my sump flooding during a power outage.
 
Oh geez that was easy thanks!! It’s a Coralbox DCA9000 it does has variable speed. I will try this out to see. I guess same goes for programming on the pump. % would go on line 12 for when pump shuts down at night

BCC96A7E-E908-41E2-A6B2-A25FA9579672.png
Just so you're aware, you cannot use multiple Min Time commands the way you show in your code. Only the last one in the list will apply, and the Apex does not execute Min Time in sequence with the commands above or below it. So in your example above, any time the output is turned off, the Min Time 015:00 Then OFF command will always apply since it's the last one.

The following commands are all just global options on an output, and applied only after all the conditions have been evaluated:
(with the exception of Fallback which applies only when the module is out of communications with the Apex)

Fallback
Defer
Min Time
When

I created this illustration to better explain these global options:
Output Global Options.png
 
Just so you're aware, you cannot use multiple Min Time commands the way you show in your code. Only the last one in the list will apply, and the Apex does not execute Min Time in sequence with the commands above or below it. So in your example above, any time the output is turned off, the Min Time 015:00 Then OFF command will always apply since it's the last one.

The following commands are all just global options on an output, and applied only after all the conditions have been evaluated:
(with the exception of Fallback which applies only when the module is out of communications with the Apex)

Fallback
Defer
Min Time
When

I created this illustration to better explain these global options:
Output Global Options.png

Just to confirm then if I needed to set multiple times, is that possible for each button on my BOB. I’m not the most technological savvy I learn what I can by reading your tutorials and that has helped tremendously but I’m confused about “global options” I don’t know what to do to use multiple times for different buttons
 
Just to confirm then if I needed to set multiple times, is that possible for each button on my BOB. I’m not the most technological savvy I learn what I can by reading your tutorials and that has helped tremendously but I’m confused about “global options” I don’t know what to do to use multiple times for different buttons
To have different timers on the same output controlled by BOB buttons, you’ll need to utilize virtual outputs to act as each timer.

In this example, I have a breakout box with port 1 named Btn_1 and port 2 named Btn_2. When I press and release Btn_1, the virtual output named Delay_5 turns on and stays on for 5 minutes due to the Min Time.

If I press and release Btn_2, that turns on virtual output Delay_15 which stays on for 15 minutes.

My Pump output turns off any time Delay_5 or Delay_15 are on, giving me two different lengths of time depending on which button I press.

[Delay_5] - virtual output
Set OFF
If Btn_1 CLOSED Then ON
Min Time 005:00 Then ON

[Delay_15] - virtual output
Set OFF
If Btn_CLOSED Then ON
Min Time 005:00 Then ON

[Pump]
Fallback ON
Set ON
If Output Delay_5 = ON Then OFF
If Output Delay_15 = ON Then OFF

Because each output can only have a single “Min Time Then ON”, and a single “Min Time Then OFF”, this method using virtual outputs gets around that limitation.

If you’re not familiar with virtual outputs, see my tutorial here:
 

IF YOU HAD TO TAKE A REEFING EXAM, WOULD YOU PASS?

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%

New Posts

Back
Top