APEX Power 000 programming check

Passedyouby

Active Member
View Badges
Joined
Jan 17, 2019
Messages
471
Reaction score
324
Rating - 0%
0   0   0
Morning! I wasnt to verify that this will actually do what im hoping..

I have a battery backup system in place, but in an effort to conserve power i want my overall temperature in the tank to drop during this time. I understand that APEX reads each line and the lowest True line is the action it takes, correct?

See below picture.

Thanks everyone!

Screenshot_20191113-080123_Apex Fusion.jpg
 
.
 
Last edited:
That’s not going to work. To do an “and” condition where you’re checking the temperature and the power, you’ll need a virtual output:

Blackout (virtual output)
————
Set OFF
If Temp > 77.0 Then ON
If Power Apex ON 000 Then OFF


Heater
————
Fallback ON
If Temp < 78.7 Then ON
If Temp > 79.0 Then OFF
If Output ReturnPump = OFF Then OFF
If Output Blackout = ON Then OFF

For more ideas and tips, see my Apex Power Monitoring tutorial here: https://www.reef2reef.com/ams/neptune-apex-programming-tutorials-part-4-power-monitoring.698/
 
Last edited:
Ah!!!! That makes sense!

And yes! I knew your name was familiar! Love that tutorial! I was planning on re-reading it again tonight looking for other outage tips.

Cheers. Thanks buddy
 
That’s not going to work. To do an “and” condition where you’re checking the temperature and the power, you’ll need a virtual output:

Blackout (virtual output)
————
Set OFF
If Temp > 77.0 Then ON
If Power Apex ON 000 Then OFF


Heater
————
Fallback ON
If Temp < 78.7 Then ON
If Temp > 79.0 Then OFF
If Output ReturnPump = OFF Then OFF
If Output Blackout = ON Then OFF

For more ideas and tips, see my Apex Power Monitoring tutorial here: https://www.reef2reef.com/ams/neptune-apex-programming-tutorials-part-4-power-monitoring.698/


Actually, why does this work? It looks like the heater code is saying that if the blackout switch turns on, then to turn the heater off? How does the virtual outlet override the original programming?
 
Actually, why does this work? It looks like the heater code is saying that if the blackout switch turns on, then to turn the heater off? How does the virtual outlet override the original programming?

I "reversed" the logic when checking the Apex power, to see if it's On rather than Off:

Blackout (virtual output)
————
Set OFF <-- start by turning Off the virtual output
If Temp > 77.0 Then ON <-- if the temperature is above 77, turn On the virtual output
If Power Apex ON 000 Then OFF <-- If the Apex still has power, turn Off the virtual output because you want your regular heater code to operate normally.

So, if the temperature is above 77.0, AND the Apex power is out, then the virtual output is left in the ON state.

Now, walk through your heater code:

Heater
————
Fallback ON <-- If the EnergyBar is not communicating with the Apex, then turn On
If Temp < 78.7 Then ON <-- If the temp is below 78.7, turn On (whether there's a power failure or not, doesn't matter)
If Temp > 79.0 Then OFF <-- If the temp is over 79.0, turn Off
If Output ReturnPump = OFF Then OFF <-- If the return pump is off, turn Off
If Output Blackout = ON Then OFF <-- Blackout will be ON only if the temp is over 77.0, and the power is out as described above, so that would turn Off your heater at 77.0 rather than 79.0.

Remember, only the last line of code that evaluates true will set the output state.
 
Last edited:
@Passedyouby On another note, does your heater have its own built-in termostat? If not, I'd advise against using Fallback ON, otherwise nothing would turn off the heater in the event of communications loss between the EnergyBar and the Apex.
 
@Passedyouby On another note, does your heater have its own built-in termostat? If not, I'd advise against using Fallback ON, otherwise nothing would turn off the heater in the event of communications loss between the EnergyBar and the Apex.


Yes, im using 2 eheim jagers with built in thermostats set for around 80degrees. Good eye though!

Hate those heaters with a passion. They usually take anywhere from 5sec to 5min to actually turn on and it triggers an apex alarm letting me know the heater isnt drawing enough juice. Need to add a defer statment, but havent taken the time to set up a virtual outlet (i think thats the only way?).
 
I "reversed" the logic when checking the Apex power, to see if it's On rather than Off:

Blackout (virtual output)
————
Set OFF <-- start by turning Off the virtual output
If Temp > 77.0 Then ON <-- if the temperature is above 77, turn On the virtual output
If Power Apex ON 000 Then OFF <-- If the Apex still has power, turn Off the virtual output because you want your regular heater code to operate normally.

So, if the temperature is above 77.0, AND the Apex power is out, then the virtual output is left in the ON state.

Now, walk through your heater code:

Heater
————
Fallback ON <-- If the EnergyBar is not communicating with the Apex, then turn On
If Temp < 78.7 Then ON <-- If the temp is below 78.7, turn On (whether there's a power failure or not, doesn't matter)
If Temp > 79.0 Then OFF <-- If the temp is over 79.0, turn Off
If Output ReturnPump = OFF Then OFF <-- If the return pump is off, turn Off
If Output Blackout = ON Then OFF <-- Blackout will be ON only if the temp is over 77.0, and the power is out as described above, so that would turn Off your heater at 77.0 rather than 79.0.

Remember, only the last line of code that evaluates true will set the output state.

Wow. This messes with my head a little bit with all of the ONs and OFFs, but the in depth walk though really helps! Thank you! Im going to play with a few more outlets now :)
 
Wow. This messes with my head a little bit with all of the ONs and OFFs, but the in depth walk though really helps! Thank you! Im going to play with a few more outlets now :)

I know, it can get confusing. Here's the way I think about it when going through a long block of Apex code:

Think about a long hallway that has a single light at the end of the hall, but has several light switches along the wall. As you walk down the hall and turn On or turn Off the light switches, but skip some of them, the last one you turned turned On or Off will decide if the light is illuminated or not.
 
I "reversed" the logic when checking the Apex power, to see if it's On rather than Off:

Blackout (virtual output)
————
Set OFF <-- start by turning Off the virtual output
If Temp > 77.0 Then ON <-- if the temperature is above 77, turn On the virtual output
If Power Apex ON 000 Then OFF <-- If the Apex still has power, turn Off the virtual output because you want your regular heater code to operate normally.

So, if the temperature is above 77.0, AND the Apex power is out, then the virtual output is left in the ON state.

Now, walk through your heater code:

Heater
————
Fallback ON <-- If the EnergyBar is not communicating with the Apex, then turn On
If Temp < 78.7 Then ON <-- If the temp is below 78.7, turn On (whether there's a power failure or not, doesn't matter)
If Temp > 79.0 Then OFF <-- If the temp is over 79.0, turn Off
If Output ReturnPump = OFF Then OFF <-- If the return pump is off, turn Off
If Output Blackout = ON Then OFF <-- Blackout will be ON only if the temp is over 77.0, and the power is out as described above, so that would turn Off your heater at 77.0 rather than 79.0.

Remember, only the last line of code that evaluates true will set the output state.

I just ran across this older thread, but If I am not mistaken, this will bounce the heater outlet around the 77.0-77.1 degree mark when running on battery backup

If Temp < 78.7 Then ON <-- this line will have the heater on at any temp below 78.8
If Output Blackout = ON Then OFF <-- if on battery turn off the heater once temp is > 77.0

In a power outage situation if the temp rises to 77.1 the heater outlet will be truned off, then once the temp drops below 77.1 it will turn it back on, then once it gets to 77.1 off again, then once below 77.1 on again... over and over.

I believe you should separate these into two virtual outlets:

HeaterNorm: (Virtual Outlet)
————
If Temp < 78.7 Then ON
If Temp > 79.0 Then OFF
If Power Apex OFF 000 Then OFF
<-- if Apex is on battery backup turn this virtual outlet off

HeaterUPS: (Virtual Outlet)
————
If Temp < 76.0 Then ON
<-- set to the lowest. you want it to go during power outage
If Temp > 77.0 Then OFF <-- set to highest you want it to reach during power outage
If Power Apex ON 000 Then OFF <-- if Apex is on normal power turn this virtual outlet off


Heater: (Physical Outlet)
————
Fallback ON
If Output HeaterNorm = ON Then ON
If Output ReturnPump = OFF Then OFF
If Output HeaterUPS = ON Then ON
<-- not sure but you might want to put this above the returnpump line depending on if you want this to be off during a power outage if the returnpump is also off.

Adam
 

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%
Back
Top