Apex flush valve code using osc

Neptune

Dburr1014

Well-Known Member
View Badges
Joined
May 8, 2016
Messages
910
Reaction score
568
I'm trying to use the osc code to flush my membrane 1 minute at start up and 1 minute every hour there after. I'm new to apex so just double checking. This is what I have. I'm also waiting for my float valve to arrive so the ato will be fully automatic.
Thanks

Screenshot_20210223-071052_APEX Fusion.jpg
 
CORAL MANIA Live Event!
OP
Dburr1014

Dburr1014

Well-Known Member
View Badges
Joined
May 8, 2016
Messages
910
Reaction score
568
Thanks I will look to see if he has anything. I may have it backwards. The statement reads
On then,
OFF for a minute,
Then ON for 59 minutes.
My rewrite is correct I think, I just don't know if the last statement should be then on or then off.

Screenshot_20210223-150954_APEX Fusion.jpg
 

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
3,125
Reaction score
7,115
Location
Oregon
You will need to split this out into two separate components:

1. The initial 1 minute flush when the RO unit is first turned on.
2. The ongoing hourly flush.

This will require the use of a couple of virtual outputs to track the state of where it is in the process:

[Initial_Flush] -- virtual output
Set OFF
If Output AT-RO-DI = ON Then ON
If Output Flush_Timer = ON Then OFF

[Flush_Timer]
Set OFF
If Output AT-RO-DI = ON Then ON
Defer 001:00 Then ON

Then change your physical output code to this:

Fallback OFF
OSC 000:00/001:00/059:00 Then ON
If Output Initial_Flush = ON Then ON
If Output AT-RO-DI = OFF Then OFF

(there's no need for Set OFF because OSC has its own built-in ON and OFF states)

The Initial_Flush will cause it to turn on right away when you start the RO unit, and will run for 1 minute until the Flush_Timer reaches 1 minute.

However, here's one small caveat with this approach. The OSC command runs every hour on the hour, so depending on what time of day you turn on the RO unit, the OSC may flush shortly after the initial flush or any time up to 59 minutes later. But after that it will continue once per hour.

If you're not familiar with virtual outputs, see my tutorial here:
 
Last edited:
CORAL MANIA Live Event!

DiefsReef

Well-Known Member
View Badges
Joined
Jul 7, 2017
Messages
656
Reaction score
3,417
Location
ATL
You will need to split this out into two separate components:

1. The initial 1 minute flush when the RO unit is first turned on.
2. The ongoing hourly flush.

This will require the use of a couple of virtual outputs to track the state of where it is in the process:

[Initial_Flush] -- virtual output
Set OFF
If Output AT-RO-DI = ON Then ON
If Output Flush_Timer = ON Then OFF

[Flush_Timer]
Set OFF
If Output AT-RO-DI = ON Then ON
Defer 001:00 Then ON

Then change your physical output code to this:

Fallback OFF
OSC 000:00/001:00/059:00 Then ON
If Output Initial_Flush = ON Then ON
If Output AT-RO-DI = ON Then OFF

(there's no need for Set OFF because OSC has its own built-in ON and OFF states)

The Initial_Flush will cause it to turn on right away when you start the RO unit, and will run for 1 minute until the Flush_Timer reaches 1 minute.

However, here's one small caveat with this approach. The OSC command runs every hour on the hour, so depending on what time of day you turn on the RO unit, the OSC may flush shortly after the initial flush or any time up to 59 minutes later. But after that it will continue once per hour.

If you're not familiar with virtual outputs, see my tutorial here:
Thank you for the response @SuncrestReef The link you posted asctually helps me with a quesiton I had at the moment on seting up mine!
 
Neptune

Are you currently housing your most favorite fish ever?

  • Yes (please tell us what in the thread)

    Votes: 118 34.2%
  • No

    Votes: 219 63.5%
  • Other (please explain)

    Votes: 8 2.3%

Online statistics

Members online
2,179
Guests online
5,801
Total visitors
7,980
QT FISH
Top