Programming Apex to Control Calcium Reactor

CCK_8814

2500 Club Member
View Badges
Joined
May 22, 2018
Messages
3,169
Reaction score
1,489
Location
Detroit
Rating - 90.9%
20   2   0
So I’m trying to figure out how to write a code for my apex to help control the CO2 regulator on my calcium reactor. Basically, I need it to do something like this:

If alkalinity >8.8 then reactor pH 6.90
If alkalinity <9.0 then reactor pH 7.00

Or even something as simple as:

If alkalinity >8.8 then CO2 solenoid on
If alkalinity <9.0 then CO2 solenoid off

I’m hoping someone with better apex coding skills then myself can help me out. If need any info/screen shots from my fusion let me know. Thanks!
 
I have mine setup (thanks to coralfuture) the way as written on the second example you have. It is spot on
 
What happens when alk is 8.9?
Solenoid off and then On constantly switching.

Better to code
>8.9
<8.8
 
for 6 hours. If that happened in my systems the alk would plummet over that time. The code using limiter vo’s and trident to control carx that seem much more effective and safer.

It’s controlled via KH guardian. System auto doses as needed, is also supplemented with kalkwasser & there is also a virtual outlet programmed that automatically kicks the solenoid on for 15 minutes of its off for more than 45.
 
for 6 hours. If that happened in my systems the alk would plummet over that time. The code using limiter vo’s and trident to control carx that seem much more effective and safer.

Still being dialed in but a 0.5 fluctuation throughout day isn’t bad IMO.

4E8D8598-19B7-4483-B377-D173773563EA.png
 
It’s controlled via KH guardian. System auto doses as needed, is also supplemented with kalkwasser & there is also a virtual outlet programmed that automatically kicks the solenoid on for 15 minutes of its off for more than 45.
Gotcha. I missed the KH guardian part.
 
Apex cannot do comparative statements unfortunately. I just set my CaRx to run continuously at a specified pH.
 
If it’s off, the code isn’t working correctly,
Because

If alkalinity >8.8 then CO2 solenoid on

Should turn it on when it’s at 8.9
This is how it’s coded. If it’s less than 8.85 solenoid is on. If it’s greater than 9.0 it’s off. If it’s off for longer than 45 minutes it turns on for 10 even if alk is above 9.

122DC6DB-B806-4E7F-BF9F-D840ADEF7B31.png BFCCAFC1-90EB-4617-91C2-A0D26F54FF87.png
 
If alkalinity >8.8 then CO2 solenoid on
If alkalinity <9.0 then CO2 solenoid off

Wouldn’t you want the CO2 solenoid on if the alkalinity were below 8.8, rather than above? Something like

FALLBACK OFF
SET ON
If ALK > 9.0 Then OFF
DEFER 001:00 Then OFF

Edit - never mind, I see you fixed it.
 
Wouldn’t you want the CO2 solenoid on if the alkalinity were below 8.8, rather than above? Something like

FALLBACK OFF
SET ON
If ALK > 9.0 Then OFF
DEFER 001:00 Then OFF
See my response above showing code. If alk is below 8.85 the solenoid is on.
 
This is how it’s coded. If it’s less than 8.85 solenoid is on. If it’s greater than 9.0 it’s off. If it’s off for longer than 45 minutes it turns on for 10 even if alk is above 9.

122DC6DB-B806-4E7F-BF9F-D840ADEF7B31.png BFCCAFC1-90EB-4617-91C2-A0D26F54FF87.png

this code makes sense.

the code in the original post did not!
 
Ya it took some tweaking but with the help of another member here I was able to get it going!
I know this is an old post but can you clarify - When using VOs to control the CO2, are you letting your effluent run without interruption and relying on only the CO2 levels to control effluent concentration? If so, do you have a failsafe high alk setpoint at which the effluent turns off?
 

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