APEX programming help

jahmic

Reef Shark
M.A.S.C Club Member
#1
I finally decided to hook up an EB8 I picked up months ago. I'm usually OK with APEX programming...but it admittedly takes me a bit of research, trial, and error to get things right. Figured I'd just ask for help since the incoming programming headache is part of why I've been procrastinating on this project for months.

I'd like my UV filter to run 24/7 with a couple exceptions. I'd like it to shut off for 12hrs if the temperature in the tank reaches 82.0 degrees, and I'd like it to automatically shut off when I turn off my return pump.

So for the UV...

Fallback ON
Set ON
IF Temp >82.0 Then OFF
Defer 720:00 Then ON
IF Outlet **??** = OFF Then OFF

Not sure what to use for the outlet name for the return pump. I had renamed the outlet as "Return" and tried that as the outlet name in the program...but when I manually shut the return off the UV stays on so apparently that's not correct? I didn't get an error when I saved the program so I'm not sure what's up. Tried - IF Outlet base_Out1 = OFF Then OFF and got an error saying there wasn't an outlet with that name...I thought maybe the default name was what I needed. Anyway...what's the solution? Also...will the exception that shuts the outlet off for 12 hrs also trigger anytime I manually shut off the return pump? It's no big deal since that's something I do maybe once every 3 months...but just wanted to know in advance.
 

jahmic

Reef Shark
M.A.S.C Club Member
#2
Oh...one more request :)

I am running a JBJ ato that I previously put on a timer for redundancy...it limits the JBJ from running for more than 15 minutes every 3 hours or so. I'd like to use the APEX to change this up significantly.

I just need a simple program that will tell the JBJ ato unit to turn on for 1 minute every 20 minutes. Probably really simple but still over my head :/
 

zombie

Dolphin
M.A.S.C Club Member
#3
This is what you want for the UV. You will need a virtual outlet for it do do what you want.

UVTemp (VO)
Set OFF
If temp > 82.0 Then ON
Defer 000:05 Then ON
Min Time 720:00 Then ON

UV outlet
Fallback ON
Set ON
If Outlet UVTemp = ON Then OFF
If Outlet Return = OFF Then OFF


For the jbj, all you need is an osc statement

Fallback ON
OSC 000:00/001:00/019:00 Then ON
 

jahmic

Reef Shark
M.A.S.C Club Member
#4
OK that makes sense. I had setup a virtual outlet for my feeder in the past so hopefully I can remember the process.

Do I also need to setup a virtual outlet for my return pump? I tried the following and it didn't work for some reason

Fallback ON
Set ON
If Outlet Return = OFF Then OFF

Edit: Nevermind the above question...I had one too many beers last night and the UV was set to "ON" instead of "AUTO". Fail haha. This is how lost I am sometimes...
 
Last edited by a moderator:

jahmic

Reef Shark
M.A.S.C Club Member
#5
Also...just trying to understand the programming here:

Set OFF
If temp > 82.0 Then ON
Defer 000:05 Then ON
Min Time 720:00 Then ON

Should the last line in the virtual outlet read: "Min Time 720:00 Then OFF"? That way the virtual outlet that shuts off the UV turn off after 12hrs allowing the UV to turn back on? It seems like that last command would make the UV stay off indefinitely... but...I stink at programming so help me understand this lol.
 
Last edited by a moderator:

DyM

Sting ray
M.A.S.C Club Member
#6
So I use virtual outlets only to get complex and this isn't complex. Not saying zombie's suggestion is wrong, but I'd rather have one complex outlet, then two entries on my summary panel. Simply, since your set and fallback are on, only change your defer to off, and you had it in your first post.

For your question in post 5, it's correct as is with min time to on, because you have it set to off as the starting condition.

Lastly, it he OSC command is correct, and if you want ON, then OFF, that is how you set it. If you wanted OFF than ON, you would put the 019:00 first. For ATO, it's not Important, but for dosing alk and calk, better to dose them separately.
 

zombie

Dolphin
M.A.S.C Club Member
#7
DyM. I would have suggested the simple route without the virtual outlet, but there are conflicting conditions that require different delays so it is necessary. Any defer or Min Time statement applies to the entire outlet, so without the virtual outlet, any time the return pump turns off, the UV would turn off for 12 hours as well. If jahmic wanted the UV to also turn off for 12 hours when the return pump turned off, then he could avoid the virtual outlet.

In the virtual outlet it should in fact read as I originally shown. This virtual outlet uses reverse logic so that whenever your temp reaches at least 82.1 degrees, then the virtual outlet turns on and stays on for 12 hours even if the temp goes below 82 during that time.

You dont need a VO for the return pump, just change the "Return" to whatever your return pump outlet is named.
 
Last edited by a moderator:
Top