Need help with Apex virtual outlet for calcium reactor

A_Blind_Reefer

Valuable Member
View Badges
Joined
Aug 13, 2019
Messages
2,088
Reaction score
2,772
Rating - 0%
0   0   0
I’m severely visually challenged now and doing any advanced programming within apex is interesting to say the least with a screen reader. What I’m trying to do is make a virtual outlet to help warn me of a problem like running out of co2. I know it sounds stupid, like duh check your co2 gauge or ph in the reactor. Every little thing helps when you can’t see to read a gauge. So, I have a ph probe in my carx labeled ph2, it’s a classic apex so I can’t change the name. I have a solenoid on the co2 bottled labeled carx_solenoid. I have the solenoid programmed to turn on at ph2 6.25 and off at 6.18. I have dialed in the reactor so that it runs pretty stable at 6.2 ph without hitting the solenoid trigger points but a couple times a day. I have the solenoid programmed to shut off from 1-4am as there is no Alk demand during those hours. I also have the solenoid programmed to switch off whenever the return pump is off, like feed cycles and maintenance. Everything has been just fine. I’m wanting to make a virtual outlet called checkcarx. I want it to turn on if the carx_solenoid is on for say thirty minutes and the ph2 is still above 6.50. It takes about 15-20 minutes for the reactor to pull down from 7.8 to 6.2 when it switches back on at 4am. I don’t want it turning on when the solenoid is off overnight or durning feed cycles. I tried fallback off, set off, if carx_solenoid on then on, if ph2 > 6.50 then on, defer 030:000 then on but that isn’t working out right. Of course I may have screwed something up as what I hear the screen reader say and what I type out are completely different. Thanks for any help
 
OP
OP
A_Blind_Reefer

A_Blind_Reefer

Valuable Member
View Badges
Joined
Aug 13, 2019
Messages
2,088
Reaction score
2,772
Rating - 0%
0   0   0
I think I got it worked out. I changed the ph on to off basically. It’s now
Fallback off
Set off
If carx_solenoid on then on
If ph2 < 6.30 then off
Defer 015:00 then off

I haven’t tested it out yet but I think it’s right. Hopefully if the carx solenoid has been on for 15 minutes but the ph hasn’t dropped to below 6.30, the outlet turns on and the apex sends an alert so I know to check it out before my Alk drops.
 

Tastee

Valuable Member
View Badges
Joined
Oct 19, 2018
Messages
1,124
Reaction score
893
Location
Sydney, Australia
Rating - 0%
0   0   0
Hi, you are almost right. The Defer command is a little tricky as the state after the Then refers to the state you want to affect, not the state you potentially want to change to, hope that isn’t too confusing. This should do what you want. I am assuming that carx_solenoid is a virtual outlet.

Set OFF
If Outlet carx_solenoid = ON Then ON
If ph2 < 6.30 Then OFF
Defer 015:00 Then ON

The Fallback command is only relevant for physical outlets, not virtual ones. The Defer command delays the change of state of an outlet, so when your carx VO is ON and that command turns this VO ON, the Defer delays it turning ON for 15 mins. If in the intervening time the PH drops below 6.3 the If command will turn it back OFF. As there is no Defer nnn:nn Then OFF command, the VO will be turned OFF immediately and that effectively cancels the 15 minute timer for the Defer ON command.
 
OP
OP
A_Blind_Reefer

A_Blind_Reefer

Valuable Member
View Badges
Joined
Aug 13, 2019
Messages
2,088
Reaction score
2,772
Rating - 0%
0   0   0
Hi, you are almost right. The Defer command is a little tricky as the state after the Then refers to the state you want to affect, not the state you potentially want to change to, hope that isn’t too confusing. This should do what you want. I am assuming that carx_solenoid is a virtual outlet.

Set OFF
If Outlet carx_solenoid = ON Then ON
If ph2 < 6.30 Then OFF
Defer 015:00 Then ON

The Fallback command is only relevant for physical outlets, not virtual ones. The Defer command delays the change of state of an outlet, so when your carx VO is ON and that command turns this VO ON, the Defer delays it turning ON for 15 mins. If in the intervening time the PH drops below 6.3 the If command will turn it back OFF. As there is no Defer nnn:nn Then OFF command, the VO will be turned OFF immediately and that effectively cancels the 15 minute timer for the Defer ON command.
Thank you for that. The carx_solenoid is a physical outlet that is on most of the time. It’s off for several hours overnight and only hits the low ph shut off a few times throughout the day. I haven’t jumped on a peristaltic pump yet. I also added a if ph > 6.10 then off statement. The reactor ph is pretty solid at 6.20 but does fluctuate from 6.18-6.22 occasionally. I figure that this statement would cover the reactor outlet getting clogged causing the ph to drop. I tested the vo by dropping the defer time to 5 minutes and it did post an alarm overnight after the carx came back online but had not reached the target ph. Thank you for your help.
 
Back
Top