Help with coding/programming

B-ridge

Valuable Member
View Badges
Joined
Nov 27, 2014
Messages
1,174
Reaction score
455
Location
Upstate New York
Rating - 0%
0   0   0
I need assistance with programming/coding my apex. Anyone with experience please contact me with your info so I can give you mine also. I'm attempting to put in place a auto water change and my auto top off using breakout box. I have a idea how this is done just don't know how I would code/program it. Or maybe you have a better suggestion or idea. Willing to pay a reasonable fee if needed. Thanks in advance
 

Waterjockey

Well-Known Member
View Badges
Joined
Mar 30, 2016
Messages
646
Reaction score
561
Rating - 0%
0   0   0
I need assistance with programming/coding my apex. Anyone with experience please contact me with your info so I can give you mine also. I'm attempting to put in place a auto water change and my auto top off using breakout box. I have a idea how this is done just don't know how I would code/program it. Or maybe you have a better suggestion or idea. Willing to pay a reasonable fee if needed. Thanks in advance

I have both of these running off my apex (ato via breakout box, and auto water change system). I am more than happy to share my setup if you want (no fee required lol).

When you got the breakout box, did you get a bunch of float switches as well?
How were you planning to do your awc? Are you using a dual head pump like a masterflex or a stenner, or are you planning to use individual dosing pumps? What size is your system, and how much water would you like to change each time?

I figured I would reply in the forum instead of pm as there may be others looking to see how it's done.
 
OP
OP
B

B-ridge

Valuable Member
View Badges
Joined
Nov 27, 2014
Messages
1,174
Reaction score
455
Location
Upstate New York
Rating - 0%
0   0   0
I have a breakout box and I bought one of the magnetic float switches for my ato
For my automatic water changes I planned on doing it on a time schedule. Meaning I have 1 pump in sump to drain 5 gallons of water Monday-Friday. Then I have a pump in saltwater bin to pump 5 gallons into sump. I would have to shut off skimmer and return pump until display tank drains which takes 10 minutes. Takes 4 minutes for sump to drain the 5 gallons. Then it takes 4 minutes and 30 seconds to fill sump with pump from saltwater bucket.
My display tank is 240 gallons. My sump is 125 gallons and my fuge is 75 gallons. Total water volume approxiametley 300-320 gallons
 

andys

Well-Known Member
View Badges
Joined
Jan 9, 2016
Messages
524
Reaction score
153
Location
San Francisco Bay area
Rating - 0%
0   0   0
I'm guessing you have all that stuff in a fish room right ? some pictures would be cool. sorry couldn't help on the apex
 

Waterjockey

Well-Known Member
View Badges
Joined
Mar 30, 2016
Messages
646
Reaction score
561
Rating - 0%
0   0   0
I have a breakout box and I bought one of the magnetic float switches for my ato
For my automatic water changes I planned on doing it on a time schedule. Meaning I have 1 pump in sump to drain 5 gallons of water Monday-Friday. Then I have a pump in saltwater bin to pump 5 gallons into sump. I would have to shut off skimmer and return pump until display tank drains which takes 10 minutes. Takes 4 minutes for sump to drain the 5 gallons. Then it takes 4 minutes and 30 seconds to fill sump with pump from saltwater bucket.
My display tank is 240 gallons. My sump is 125 gallons and my fuge is 75 gallons. Total water volume approxiametley 300-320 gallons

Easy as pie with Apex.
I'll break this up into two messages, one for the auto water change, one for the single switch ato
I'll do the waterchange one first, as it is actually simplier.

First you will need to create a "virtual outlet" to control when automatic water changes (awc) takes place, and to control the other equipment.
Virtual outlets are the ones named "Cntl_A1", Cntl_A2" etc.
My virtual outlet is named "WaterChange" (inventive, I know)
This is my code with the Day Of Week command added for you;

WaterChange

Fallback OFF
Set OFF
If Time 07:00 to 07:30 Then ON
If DoW S-----S Then OFF
If SmpHi OPEN Then OFF

Fallback OFF, Set OFF are self explanatory
If Time, is when you would like the awc to take place. In my case, it starts at 7:00am......you can set it for whatever time you want it to happen.
The DoW command is s, followed by 5 dashes, followed by an s. This means if it is a Sunday or a Saturday, it will not run, only doing the water changes Monday to Friday each week.

Now add the line "If outlet WaterChange = On Then Off" to your return pump code, and your skimmer code. Preferably one of the last statements in each of their codes (just make sure there isn't a "Then On" statement after your "If Outlet WaterChange" statement in each of them). This will turn your return pump and skimmer off when the water change is taking place.

The "If SmpHi" statement in my code, is for a sump high level switch, which shuts off all kinds of stuff if it detects a high level in the sump. If you don't have something like that, then just don't add the line.

Next is pumping the water out. These are real outlets, one for the old salt water out, and one for the new salt water in.
Start with pumping the old water out. I named that outlet OSWout

OSWout

Fallback OFF
OSC 010:00/004:00/046:00 Then ON
If Outlet WaterChange = OFF Then OFF

So this tells the pump to wait 10 minutes from the top of the hour before doing anything. It then runs for 4 minutes. It then waits another 46 minutes, to complete a 60 minute cycle. The 10 minute wait is how long you told me it takes for your return to drain down. If you need a different amount of time, we can change that. The Line "If Outlet WaterChange =OFF Then OFF" is important, and makes sure this only runs when the virtual outlet WaterChange is ON....otherwise it would repeat at the top of every hour, non stop. Outlet WaterChange is only on Monday to Friday from 7am to 7:30 am, so this is the only time it will run.

Now we can pump the new water in. I named that outlet NSWin

NSWin

Fallback OFF
OSC 0:15/004:30/040:30 Then ON
If Outlet WaterChange = OFF Then OFF

Same idea, except the new water in pump waits 15 minutes before doing anything. This allows your drains to finish (10 min), plus the old water out pump to run (4 min). It then pumps for 4 min, 30 seconds, then sits around and does nothing for 40 min and 30 seconds. By then, outlet WaterChange will have switched to OFF, so we are done.

Let me know if you have any questions
 

Waterjockey

Well-Known Member
View Badges
Joined
Mar 30, 2016
Messages
646
Reaction score
561
Rating - 0%
0   0   0
For the single switch ATO, I am going to assume the switch is normally OPEN when everything is fine, and switches to CLOSED when the sump level falls and it calls for water. If it is the other way around, then you need to swap the OPEN and CLOSED statements in the code.
I named the switch I use to run my ATO "SmpNmL"

The very basic code would look like this

ATO

Fallback OFF
Set OFF
If SmpNmL CLOSED Then ON
Defer 001:00 Then ON
Min Time 005:00 Then OFF
If SmpNmL OPEN Then OFF

Again, Fallback OFF, Set OFF statements are self explanatory
If SmpNml CLOSED the ON, is pretty self explanatory as well, if the water level is low, then turn on.
Defer 001:00 Then ON is a "debounce" line, so little waves and such don't turn your ato on every 2 seconds. It has to want to have water for a full minute, uninterrupted, before it actually allows it to turn on.
Min Time 005:00 Then OFF tells the ato to run for a minimum of 5 minutes before it shuts off, regardless of any switch positions. This just makes sure it doesn't shut off 10 seconds after it starts....kind of like the "debounce" line above it again.
If SmpNmL OPEN the OFF.....we've added as much water as we want, so shut off and wait around for next time.

If I can add a tiny bit of advice, from experience. Always use two switches for everything. I have 2 switches wired in parallel for the "SmpNml" level switch. If either switch calls for water, it will start. This is a fail safe protection in case one switch fails.....and it happens.
2nd bit of advice if I can, is I also have the following lines in my ato code; right after the code I posted above

If SmpHi OPEN Then OFF
If Outlet ATOLATCH = ON Then OFF

I explained the SmpHi switch(es) before. If it detects a high level in the sump it shuts off. Same idea, the SmpHi switches are two switches tied together in parallel, so if either switch is made, it works. Last thing I want is a failed high level control

The "If Outlet ATOLATCH = ON Then OFF is a "stuck float switch detection" via timer. ATOLATCH is a virtual outlet that has a defer command that starts when my ato starts filling, it's code looks like this

ATOLATCH

If Outlet ATO_RODI = ON Then ON
Defer 020:00 Then ON

So if my ATO starts filling (Outlet ATO_RODI = ON) it turns the virtual outlet ATOLATCH on.....almost. The "Defer 020:00 Then ON", says turn on after a 20 minute wait. So if my ATO starts filling, and it's done in 10, 15 min it never turns on. If it takes more than 20 min, I am assuming the SmpNmL switch is stuck, and not shutting off. This will shut it off anyway, and is in my alarm code, to send me a text if it ever kicks in (It should never kick in).

The ATOLATCH virtual outlet will ensure you don't ever accidentally turn your salt tank into a freshwater tank.
 
OP
OP
B

B-ridge

Valuable Member
View Badges
Joined
Nov 27, 2014
Messages
1,174
Reaction score
455
Location
Upstate New York
Rating - 0%
0   0   0
@Waterjockey-thank so for taking the time out to help me and even write the codes. I'm gonna attempt to do this Tuesday when I'm off of work. Hopefully you'll be around in case I run into a snafu of some sorts
 

Waterjockey

Well-Known Member
View Badges
Joined
Mar 30, 2016
Messages
646
Reaction score
561
Rating - 0%
0   0   0
You are welcome.
I'll be around most of the day tomorrow...let's get this up and running :)
 
OP
OP
B

B-ridge

Valuable Member
View Badges
Joined
Nov 27, 2014
Messages
1,174
Reaction score
455
Location
Upstate New York
Rating - 0%
0   0   0
I just wanted to update and give a great BIG THANKS to kevin(waterjockey). He helped me, well basically did everything that I wanted to get out of my apex so far. Took care of the auto top off no priblem. Doing the auto water change was a blast and didn't take as long as I thought it would. Of course we ran into a couple hiccups here and there but nothing Kevin couldn't take care of. This was all done over the phone by texting at that. He came up with a bunch of fail safes I didn't even think of. I can't wait to see what else we come up with for my system. For now everything is pretty much automated. Next up is my rodi with booster pump filling automatically so I just have to add salt every 2 weeks. Then will be ati hook up with the LED lights strips.
I'm telling you NEPTUNE APEX needs to hire this guy. He knows what he's doing and talking about. Before I met Kev I contacted Neptune for some issues I was having with my apex and customer support was a week and a half till they could even attempt to see what my issue was. Met Kev and he had it taken care of in less than 10 minutes.
Any questions or issues you might be having ask Kev. I'm sure if he's availiable or has time he will help you out.
THANKS AGAIN KEV
 

Waterjockey

Well-Known Member
View Badges
Joined
Mar 30, 2016
Messages
646
Reaction score
561
Rating - 0%
0   0   0
Thanks man. It was fun and we both learned a few things along the way :) You did a nice job on all the hardare :)
 
OP
OP
B

B-ridge

Valuable Member
View Badges
Joined
Nov 27, 2014
Messages
1,174
Reaction score
455
Location
Upstate New York
Rating - 0%
0   0   0
Update
Is there anyone else who can help me out? My good buddy Kev is out of commission for awhile and I’m having a issue with my breakout box. I rewired everything and now none of my float switches are working. I find it odd for 5 float switches to go bad st once.
If your familiar with the apex we can do exactly what myself and Kev did. I’ll give you my password and log in for fusion and we can communicate through phone or text. Please help. Tank starting to look bad
 

Caring for your picky eaters: What do you feed your finicky fish?

  • Live foods

    Votes: 13 27.7%
  • Frozen meaty foods

    Votes: 39 83.0%
  • Soft pellets

    Votes: 7 14.9%
  • Masstick (or comparable)

    Votes: 3 6.4%
  • Other

    Votes: 2 4.3%
Back
Top