Co2 scrubber and skimmer settings

Users Who Are Viewing This Thread (Total: 1, Members: 0, Guests: 1)

Nht

Active Member
View Badges
Joined
Dec 21, 2006
Messages
250
Reaction score
64
Rating - 0%
0   0   0
I recently started scrubbing my co2 and it’s actually working a little too well. At times it’s gone up to 8.45. I want to keep it under 8.32. How does this look? Did I do it right?
126749BC-173C-438A-B03D-5635A414AD3E.png
 

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
4,214
Reaction score
9,217
Location
Oregon
Rating - 0%
0   0   0
This won't work.

You are misunderstanding how the Apex code is processed. It does not execute commands one after the other in sequence like other typical computer programming languages. Instead, the Apex evaluates each condition from top to bottom once per second, and the last line that evaluates True will set the output On or Off.

The Set command is absolute, so when you say Set ON or Set OFF, that's unconditional. Only the If commands are conditional. So for example, your code will completely ignore everything above line 5 (Set OFF) because everything above it will be overruled by Set OFF. If you want to maintain a range between two values, then don't use any Set command at all.

Additionally, the Fallback command has nothing to do with normal programming. Fallback is only used to instruct the output how to behave if the Apex is ever disconnected (either unplugged, rebooting, or locked up) from the module that controls this output, telling it to be ON or OFF by default until the Apex is back in control of the output's behavior.

Lastly, the Defer, Min Time, and When commands are only processed after all the conditions have been evaluated. They are global options for the output.

Based on what you described, this should be what you want:

Fallback OFF
If pH < 8.27 Then ON
If pH > 8.32 Then OFF
If Output Vectra = OFF Then OFF

Please read my series of Apex Tutorials to get up to speed on the programming:
 
Last edited:

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
4,214
Reaction score
9,217
Location
Oregon
Rating - 0%
0   0   0
Here's an illustration I put together to demonstrate how the Fallback, Defer, Min Time, and When commands are just global options for the outputs rather than part of the conditions that get evaluated:

Output Global Options.png
 
OP
OP
Nht

Nht

Active Member
View Badges
Joined
Dec 21, 2006
Messages
250
Reaction score
64
Rating - 0%
0   0   0
This won't work.

You are misunderstanding how the Apex code is processed. It does not execute commands one after the other in sequence like other typical computer programming languages. Instead, the Apex evaluates each condition from top to bottom once per second, and the last line that evaluates True will set the output On or Off.

The Set command is absolute, so when you say Set ON or Set OFF, that's unconditional. Only the If commands are conditional. So for example, your code will completely ignore everything above line 5 (Set OFF) because everything above it will be overruled by Set OFF. If you want to maintain a range between two values, then don't use any Set command at all.

Additionally, the Fallback command has nothing to do with normal programming. Fallback is only used to instruct the output how to behave if the Apex is ever disconnected (either unplugged, rebooting, or locked up) from the module that controls this output, telling it to be ON or OFF by default until the Apex is back in control of the output's behavior.

Lastly, the Defer, Min Time, and When commands are only processed after all the conditions have been evaluated. They are global options for the output.

Based on what you described, this should be what you want:

Fallback OFF
If pH < 8.27 Then ON
If pH > 8.32 Then OFF
If Output Vectra = OFF Then OFF

Please read my series of Apex Tutorials to get up to speed on the programming:
Thank you for the reply. I have the skimmer to turn off when Feed mode A is engaged. Will the code you posted affect that?
 

High pressure shells: Do you look for signs of stress in the invertebrates in your reef tank?

  • I regularly look for signs of invertebrate stress in my reef tank.

    Votes: 42 31.6%
  • I occasionally look for signs of invertebrate stress in my reef tank.

    Votes: 30 22.6%
  • I rarely look for signs of invertebrate stress in my reef tank.

    Votes: 27 20.3%
  • I never look for signs of invertebrate stress in my reef tank.

    Votes: 34 25.6%
  • Other.

    Votes: 0 0.0%
Back
Top