Need help programming apex

Art2249

Active Member
View Badges
Joined
Apr 22, 2018
Messages
468
Reaction score
460
Rating - 0%
0   0   0
Is there a way to program an outlet to shut off at below a given salinity and come back on at a given higher salinity? I already know how to do the first part:
FALLBACK OFF
IF SALT < 34 THEN OFF
 

mich2599

Valuable Member
View Badges
Joined
May 19, 2018
Messages
2,087
Reaction score
12,395
Location
ELDO
Rating - 0%
0   0   0
In my experience, not talking for others, my salinity probe is very unreliable. It can read 37 ppt and then 25 ppt. I’ve calibrated the thing so many times I have just given up.
 
OP
OP
Art2249

Art2249

Active Member
View Badges
Joined
Apr 22, 2018
Messages
468
Reaction score
460
Rating - 0%
0   0   0
In my experience, not talking for others, my salinity probe is very unreliable. It can read 37 ppt and then 25 ppt. I’ve calibrated the thing so many times I have just given up.
I had trouble calibrating mine as well. I finally was able to by rinsing the probe in ro water then letting it completely dry out (24 hrs) before calibrating. Since then it has been very reliable although that was 10 months ago and now i think its a little off. Probably time to re-calibrate. But mine has been working well enough that I feel confident using it as a third failsafe for my ATO. Another way would be to get a neptune level sensor but I will need a break out box to do that.
 

road_runner

Valuable Member
View Badges
Joined
Jan 6, 2017
Messages
2,325
Reaction score
2,290
Rating - 0%
0   0   0
I think you have big risk controlling something based in the salinity prob reading. Be cayeful.
A small bubble can throw off the samility ready significantly..
I have gave up on my salinity prob ready accuracy. I use it for relative measurment only not absolut measurment. More like an event monitor...
 

joeyamador

Community Member
View Badges
Joined
May 13, 2018
Messages
86
Reaction score
97
Location
Sanger
Rating - 0%
0   0   0


I had an issue bot to long age and found that lining the holes up with the flow path and tilting your probe holder allows any bubbles that could form in the probe to leave really helped me.. any bubbles from moving things,splashing or whatever could possibly get caught in probe and cause a false reading. Watch attached video it helps explain. Hope this helps man.
 
OP
OP
Art2249

Art2249

Active Member
View Badges
Joined
Apr 22, 2018
Messages
468
Reaction score
460
Rating - 0%
0   0   0
I think you have big risk controlling something based in the salinity prob reading. Be cayeful.
A small bubble can throw off the samility ready significantly..
I have gave up on my salinity prob ready accuracy. I use it for relative measurment only not absolut measurment. More like an event monitor...
The worst case scenario that I can think of is failing to turn the ATO back on, in which case it would take 2 or 3 days for the pump to run dry. I check it every day so I would catch that. The only problem I had before was that when salinity dropped below the cut off it would fluctuate back up and down, repeatedly turning the osmolator on and off and filling for 30 seconds each time that happened. Until the float switch shut it off. So I'm thinking there needs to be a differential between shut off and then back on. So I will try this:
FALLBACK OFF
IF SALT < 34 THEN OFF
IF SALT > 34.3 THEN ON
 

road_runner

Valuable Member
View Badges
Joined
Jan 6, 2017
Messages
2,325
Reaction score
2,290
Rating - 0%
0   0   0
The worst case scenario that I can think of is failing to turn the ATO back on, in which case it would take 2 or 3 days for the pump to run dry. I check it every day so I would catch that. The only problem I had before was that when salinity dropped below the cut off it would fluctuate back up and down, repeatedly turning the osmolator on and off and filling for 30 seconds each time that happened. Until the float switch shut it off. So I'm thinking there needs to be a differential between shut off and then back on. So I will try this:
FALLBACK OFF
IF SALT < 34 THEN OFF
IF SALT > 34.3 THEN ON
Got it. Its about what are you controlling at the end of the day:) good luck...
 

vhuang168

Active Member
View Badges
Joined
Apr 17, 2015
Messages
212
Reaction score
135
Location
San Jose, CA
Rating - 0%
0   0   0
The worst case scenario that I can think of is failing to turn the ATO back on, in which case it would take 2 or 3 days for the pump to run dry. I check it every day so I would catch that. The only problem I had before was that when salinity dropped below the cut off it would fluctuate back up and down, repeatedly turning the osmolator on and off and filling for 30 seconds each time that happened. Until the float switch shut it off. So I'm thinking there needs to be a differential between shut off and then back on. So I will try this:
FALLBACK OFF
IF SALT < 34 THEN OFF
IF SALT > 34.3 THEN ON


You can put a Defer so that the reading has to be at that specific level constantly for the set time before the outlet can be affected.

Defer 002:00 then Off

This makes it so the salinity has to be <34 for a whole 2 mins before the outlet turns off. If during those 2 minutes, salinity rises above that set point, timer restarts (not resumes) the next time salinity drops below the set point.
 

joeyamador

Community Member
View Badges
Joined
May 13, 2018
Messages
86
Reaction score
97
Location
Sanger
Rating - 0%
0   0   0
You can put a Defer so that the reading has to be at that specific level constantly for the set time before the outlet can be affected.

Defer 002:00 then Off

This makes it so the salinity has to be <34 for a whole 2 mins before the outlet turns off. If during those 2 minutes, salinity rises above that set point, timer restarts (not resumes) the next time salinity drops below the set point.
Can always depend on you air. :)
 
OP
OP
Art2249

Art2249

Active Member
View Badges
Joined
Apr 22, 2018
Messages
468
Reaction score
460
Rating - 0%
0   0   0
Others mentioned it, but DO NOT TRUST THAT PROBE. No matter where you place it or how many times you calibrate it, it eventually WILL drift.

Put it in the trash where it belongs.
I heard a lot of people say that. I haven't calibrated mine in 10 months and its very stable. And pretty close to my refractometer. Maybe because i have a large sump i don't know.
 
OP
OP
Art2249

Art2249

Active Member
View Badges
Joined
Apr 22, 2018
Messages
468
Reaction score
460
Rating - 0%
0   0   0
You can put a Defer so that the reading has to be at that specific level constantly for the set time before the outlet can be affected.

Defer 002:00 then Off

This makes it so the salinity has to be <34 for a whole 2 mins before the outlet turns off. If during those 2 minutes, salinity rises above that set point, timer restarts (not resumes) the next time salinity drops below the set point.
So how would you write that?
IF SALT < 34 DEFER 002.00 THEN OFF
?
 
OP
OP
Art2249

Art2249

Active Member
View Badges
Joined
Apr 22, 2018
Messages
468
Reaction score
460
Rating - 0%
0   0   0
Wait that won't work.
IF SALT <34 THEN OFF
DEFER 002.00 THEN OFF
 

rkpetersen

walked the sand with the crustaceans
View Badges
Joined
Sep 14, 2017
Messages
4,528
Reaction score
8,865
Location
Near Seattle
Rating - 0%
0   0   0
Is your osmolator using its own level sensors to decide when to dispense water?
If so your Apex is best used as a safety backup, cutting power to the outlet when there's a problem.
The code below will only cut power to the outlet if the salinity is so low that your osmolator may have malfunctioned (assuming a set point of 34.)
If it does turn it off due to low salinity indicating overfilling, it won't turn on again for 5 minutes.

Fallback ON
Set ON
If Salt < 33.7 Then OFF
Defer 005:00 Then ON

I'd also add this line to your email/text output, so you'll be notified that something is wrong.

If OutputName = OFF Then ON

Another way would be to get a neptune level sensor but I will need a break out box to do that.

To use a Neptune optical sensor, you need an FMM module.
A regular breakout box can be used with a standard float switch or any 2-wire non-powered switch.
 
OP
OP
Art2249

Art2249

Active Member
View Badges
Joined
Apr 22, 2018
Messages
468
Reaction score
460
Rating - 0%
0   0   0
Is your osmolator using its own level sensors to decide when to dispense water?
If so your Apex is best used as a safety backup, cutting power to the outlet when there's a problem.
The code below will only cut power to the outlet if the salinity is so low that your osmolator may have malfunctioned (assuming a set point of 34.)
If it does turn it off due to low salinity indicating overfilling, it won't turn on again for 5 minutes.

Fallback ON
Set ON
If Salt < 33.7 Then OFF
Defer 005:00 Then ON

I'd also add this line to your email/text output, so you'll be notified that something is wrong.

If OutputName = OFF Then ON



To use a Neptune optical sensor, you need an FMM module.
A regular breakout box can be used with a standard float switch or any 2-wire non-powered switch.
thanks for the code dude. I was beginning to think I was a dentist. Pulling teeth. Awesome that you know that stuff!!!
 
Back
Top