Neptune Apex Programming Tutorials, Part 2: Timers

OP
OP
SuncrestReef

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
4,214
Reaction score
9,217
Location
Oregon
Rating - 0%
0   0   0
I ran into one other command that I need and it does not relate to the osc commands but I need to add a few lines to some of my outlets so that if my return pump RETURN_2_1 shuts off then they will be off until it kicks back on. Things like my heaters and recirculating skimmer pumps
Just add this line to the heaters, skimmer, etc.:

If Output RETURN_2_1 = OFF Then OFF
 

Cory

More than 25 years reefing
View Badges
Joined
Oct 30, 2014
Messages
6,882
Reaction score
3,129
Location
Canada
Rating - 0%
0   0   0
How do I set up a failsafe for my apex dos to turn off if ph is greater than 8.5? Im using limewater.
 
OP
OP
SuncrestReef

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
4,214
Reaction score
9,217
Location
Oregon
Rating - 0%
0   0   0
How do I set up a failsafe for my apex dos to turn off if ph is greater than 8.5? Im using limewater.
Add this line of code in the Advanced tab on your DOS schedule screen:

If pH > 8.5 Then OFF

Screen Shot 2021-11-06 at 10.40.57 PM.png


This will block the DOS schedule from running as long as the condition is true. Once the pH goes lower, the normal DOS schedule will resume.
 

BZOFIQ

2500 Club Member
View Badges
Joined
Jul 31, 2014
Messages
4,690
Reaction score
3,990
Location
NYC
Rating - 100%
9   0   0
There is the Minimum command but I need to run something for just a minute or less when conditions are met.

Best way?

Say Outlet A is turned on and I need another outlet to turn on but only for 1 minute (30 seconds if possible)

Thanks @SuncrestReef
 
OP
OP
SuncrestReef

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
4,214
Reaction score
9,217
Location
Oregon
Rating - 0%
0   0   0
There is the Minimum command but I need to run something for just a minute or less when conditions are met.

Best way?

Say Outlet A is turned on and I need another outlet to turn on but only for 1 minute (30 seconds if possible)

Thanks @SuncrestReef
To achieve this, you need to create a virtual output that acts as a timer, then use the combination of Output A and the virtual output timer to control the 2nd output:

[V_30s_Timer]
Set OFF
If Output OutputA = ON Then ON
Defer 000:30 Then ON

[OutputB]
Set OFF
If Output OutputA = ON Then ON
If Output V_30s_Timer = ON Then OFF

If you're not familiar with virtual outputs, see my tutorial here:
 

BZOFIQ

2500 Club Member
View Badges
Joined
Jul 31, 2014
Messages
4,690
Reaction score
3,990
Location
NYC
Rating - 100%
9   0   0
To achieve this, you need to create a virtual output that acts as a timer, then use the combination of Output A and the virtual output timer to control the 2nd output:

[V_30s_Timer]
Set OFF
If Output OutputA = ON Then ON
Defer 000:30 Then ON

[OutputB]
Set OFF
If Output OutputA = ON Then ON
If Output V_30s_Timer = ON Then OFF

If you're not familiar with virtual outputs, see my tutorial here:


Thank you much @SuncrestReef

I came up with the following programming to automate my RODI system based on your suggestion.

VIRTUAL OUTLETS

[Leak-RO]
Set OFF
If Swx5_1 CLOSED Then ON
Defer 000:03 Then ON

[Leak-RODI]
Set OFF
If Swx5_2 CLOSED Then ON
Defer 000:03 Then ON

[PSI-Low] N/C
Set OFF
If IO-01 CLOSED Then ON
Defer 000:03 Then ON

[PSI-High] N/C
Set OFF
If IO-02 CLOSED Then ON
Defer 000:03 Then ON

[80G-Overfill]
Set OFF
If IO-04 CLOSED Then ON
Defer 000:05 Then ON

[RO-F-30Sec]
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:30 Then ON

[RO-D-45Sec]
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:45 Then ON

[RO-Sequence]
Fallback OFF
Set OFF
If Output PSI-High = ON Then ON
If DoW -MTW-F- Then ON
If Time 00:01 to 14:30 Then OFF
If Output PSI-Low = OFF Then OFF
If Output Leak-RO = ON Then OFF
If Output Leak-RODI = ON Then OFF
If Output 80G-Overfill = ON Then OFF

PHYSICAL OUTLETS

[TAP-Valve]
Fallback OFF
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:15 Then OFF

[RO-Flush]
Fallback OFF
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:05 Then ON
If Output RO-F-30Sec = ON Then OFF

[RO-Dump]
Fallback OFF
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:20 Then ON
If Output RO-D-45Sec = ON Then OFF

[RO-Booster]
Fallback OFF
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:15 Then ON
Defer 000:03 Then OFF
If Output TAP-Valve = OFF Then OFF




Hope I got this figured out but do chime in if you see anything off.
 
Last edited:

BZOFIQ

2500 Club Member
View Badges
Joined
Jul 31, 2014
Messages
4,690
Reaction score
3,990
Location
NYC
Rating - 100%
9   0   0
I cleaned up above, started testing this PM.

I tweaked a bit and I think it's working. Still need to test other failsafes and I hope my Virtual Outlet RO-Sequence is in correct order, so far it appears to be.

I got this when testing today,

1636489286405.png
 
Last edited:

BZOFIQ

2500 Club Member
View Badges
Joined
Jul 31, 2014
Messages
4,690
Reaction score
3,990
Location
NYC
Rating - 100%
9   0   0
@SuncrestReef

So, another problem came up, hope you can help come to the rescue.

I need an outlet (outlet Z) to run for 60 seconds whenever another outlet (A) finishes (goes off)

Thanks in advance.

EDIT: I should mention that I already have outlet Z come on for nearly 40 seconds (using VO timer) when Outlet A starts, now I need it to come on for another 60 seconds when outlet A switches off.

below, the exact current code

[RO-Flush] - Physical Outlet
Fallback OFF
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:04 Then ON
If Output RO-F-40Sec = ON Then OFF

[RO-F-40Sec] - Virtual Outlet
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:40 Then ON
 
Last edited:
OP
OP
SuncrestReef

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
4,214
Reaction score
9,217
Location
Oregon
Rating - 0%
0   0   0
@SuncrestReef

So, another problem came up, hope you can help come to the rescue.

I need an outlet (outlet Z) to run for 60 seconds whenever another outlet (A) finishes (goes off)

Thanks in advance.
That's an interesting challenge. Here's one way to do it:

[V_Timer_A] -- virtual output
Set OFF
If Output OutputA = ON Then ON
Defer 001:00 Then OFF

[OutputZ]
Set OFF
If Output V_Timer_A = ON Then ON
If Output OutputA = ON Then OFF

The way this works is that V_Timer_A will always be On any time OutputA is on, and it will remain On for 1 minute after OutputA turns Off using the Defer delay. Then because OutputZ has code checking the status of both V_Timer_A and OutputA, the only time it will turn on is during that 1 minute when OutputA first turns Off.

If you're not familiar with virtual outputs, see my tutorial here:
 

BZOFIQ

2500 Club Member
View Badges
Joined
Jul 31, 2014
Messages
4,690
Reaction score
3,990
Location
NYC
Rating - 100%
9   0   0
That's an interesting challenge. Here's one way to do it:

[V_Timer_A] -- virtual output
Set OFF
If Output OutputA = ON Then ON
Defer 001:00 Then OFF

[OutputZ]
Set OFF
If Output V_Timer_A = ON Then ON
If Output OutputA = ON Then OFF

The way this works is that V_Timer_A will always be On any time OutputA is on, and it will remain On for 1 minute after OutputA turns Off using the Defer delay. Then because OutputZ has code checking the status of both V_Timer_A and OutputA, the only time it will turn on is during that 1 minute when OutputA first turns Off.

If you're not familiar with virtual outputs, see my tutorial here:


Thanks for your response but you were responding while I was editing.

It's a bit more complicated, reposting the edit from above.


EDIT: I should mention that I already have outlet Z come on for nearly 40 seconds (using VO timer) when Outlet A starts, now I need it to come on for another 60 seconds when outlet A switches off.

below, the exact current code

[RO-Flush] - Physical Outlet
Fallback OFF
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:04 Then ON
If Output RO-F-40Sec = ON Then OFF

[RO-F-40Sec] - Virtual Outlet
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:40 Then ON
 

BZOFIQ

2500 Club Member
View Badges
Joined
Jul 31, 2014
Messages
4,690
Reaction score
3,990
Location
NYC
Rating - 100%
9   0   0
@SuncrestReef

So essentially, this is what I have so far.

Virtual Outlet that runs the timer when outlet 'Ro-Sequence' starts

[RO-F-40Sec]
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:40 Then ON

Virtual Outlet that runs the timer when outlet 'Ro-Sequence' stops

[RO-F-After]
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:40 Then OFF

Physical Outlet - this is where I need to combine running after start/after stop, so far I have it to run only at beginning of the RO-Sequence. How do we combine it all?

[RO-Flush]
Fallback OFF
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:04 Then ON
If Output RO-F-40Sec = ON Then OFF
???
 
OP
OP
SuncrestReef

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
4,214
Reaction score
9,217
Location
Oregon
Rating - 0%
0   0   0
@SuncrestReef

So essentially, this is what I have so far.

Virtual Outlet that runs the timer when outlet 'Ro-Sequence' starts

[RO-F-40Sec]
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:40 Then ON

Virtual Outlet that runs the timer when outlet 'Ro-Sequence' stops

[RO-F-After]
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:40 Then OFF

Physical Outlet - this is where I need to combine running after start/after stop, so far I have it to run only at beginning of the RO-Sequence. How do we combine it all?

[RO-Flush]
Fallback OFF
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:04 Then ON
If Output RO-F-40Sec = ON Then OFF
???
Since you have a couple of AND logic conditions to evaluate, I think the easiest thing is to split out each of those ANDs into their own virtual outputs, then only control the RO-Flush physical output by the status of the virtual outputs:

[RO-F-40Sec]
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:40 Then ON

[RO-F-After]
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:40 Then OFF

[Pre-Flush] -- new virtual output
Set OFF
If Output RO-Sequence = ON Then ON
If Output RO-F-40Sec = ON Then OFF

[Post-Flush]
-- new virtual output
Set OFF
If Output RO-Sequence = OFF Then ON
If Output RO-F-After = OFF Then OFF

[RO-Flush]
Set OFF
If Output Pre-Flush = ON Then ON
If Output Post-Flush = ON Then ON

Screen Shot 2021-11-17 at 2.15.18 PM.png
 
Last edited:

BZOFIQ

2500 Club Member
View Badges
Joined
Jul 31, 2014
Messages
4,690
Reaction score
3,990
Location
NYC
Rating - 100%
9   0   0
Since you have a couple of AND logic conditions to evaluate, I think the easiest thing is to split out each of those ANDs into their own virtual outputs, then only control the RO-Flush physical output by the status of the virtual outputs:

[RO-F-40Sec]
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:40 Then ON

[RO-F-After]
Set OFF
If Output RO-Sequence = ON Then ON
Defer 000:40 Then OFF

[Pre-Flush] -- new virtual output
Set OFF
If Output RO-Sequence = ON Then ON
If Output RO-F-40Sec = ON Then OFF

[Post-Flush]
-- new virtual output
Set OFF
If Output RO-Sequence = OFF Then ON
If Output RO-F-After = OFF Then OFF

[RO-Flush]
Set OFF
If Output Pre-Flush = ON Then ON
If Output Post-Flush = ON Then ON

Screen Shot 2021-11-17 at 2.15.18 PM.png


Let me try that, I'll report in the AM after testing. Appreciate your taking the time to help.

This is going to be the most complex, apex controlled RODI filter LOL
 

BZOFIQ

2500 Club Member
View Badges
Joined
Jul 31, 2014
Messages
4,690
Reaction score
3,990
Location
NYC
Rating - 100%
9   0   0
It verked!

I cleaned the outlet names a bit while at it.

I'll post the entire program tomorrow at link below. Perhaps someone crazy wants to automate their RO too - because why not.

https://www.reef2reef.com/threads/automating-ro-filter.711664/#post-9537902

Here is the log of the events while the system refills what's missing in the RO tank - ignore the TAP-Flow, its a flow sensor for future use. I will probably disable Timer & virtual outlet logging once it's all figured out to clean things up.

1637205091088.png


@SuncrestReef

I owe you a brewski, PM me your PP address.
 
OP
OP
SuncrestReef

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
4,214
Reaction score
9,217
Location
Oregon
Rating - 0%
0   0   0
It verked!

I cleaned the outlet names a bit while at it.

I'll post the entire program tomorrow at link below. Perhaps someone crazy wants to automate their RO too - because why not.

https://www.reef2reef.com/threads/automating-ro-filter.711664/#post-9537902

Here is the log of the events while the system refills what's missing in the RO tank - ignore the TAP-Flow, its a flow sensor for future use. I will probably disable Timer & virtual outlet logging once it's all figured out to clean things up.

1637205091088.png


@SuncrestReef

I owe you a brewski, PM me your PP address.
Glad to help! No payment necessary, but please tell me what software you used to diagram your RO system in your linked post. I need something like that!
 

BZOFIQ

2500 Club Member
View Badges
Joined
Jul 31, 2014
Messages
4,690
Reaction score
3,990
Location
NYC
Rating - 100%
9   0   0
Glad to help! No payment necessary, but please tell me what software you used to diagram your RO system in your linked post. I need something like that!

I used an old program called PhotoImpact which is a dumb version of PhotoShop (I'm just a lot quicker in it than Photoshop for silly things like this). Its actually a pre-cursor to PhotoShop that was resurrected after their non-compete agreement expired but I digress.

Needless to say, you can cobble the same using Photoshop after modifying "clip-art" elements from Google's image search. These are not original art but diagram drawings of the different components. I can certainly send you a larger file if you want to play little "photo-chopping" because that's exactly what this is.

Anyway, thanks again.
 
OP
OP
SuncrestReef

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
4,214
Reaction score
9,217
Location
Oregon
Rating - 0%
0   0   0
I used an old program called PhotoImpact which is a dumb version of PhotoShop (I'm just a lot quicker in it than Photoshop for silly things like this). Its actually a pre-cursor to PhotoShop that was resurrected after their non-compete agreement expired but I digress.

Needless to say, you can cobble the same using Photoshop after modifying "clip-art" elements from Google's image search. These are not original art but diagram drawings of the different components. I can certainly send you a larger file if you want to play little "photo-chopping" because that's exactly what this is.

Anyway, thanks again.
Thanks. I've used Visio for years and always wished someone would create some stencils for PVC, push-connect fittings, and other common plumbing parts that could be imported to Visio.
 

Jwill1316

Community Member
View Badges
Joined
Dec 12, 2022
Messages
85
Reaction score
39
Location
Jackson MI
Rating - 0%
0   0   0
What are you using to dose?

The command is different if you're using dos.
no im actually using a kalkwasser reactor its a two little fishes reactor im wanting to dose my sytem buttrying to understand how to run a command time thats less then 1min
 

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

    Votes: 47 16.8%
  • I wear reef gear primarily at fish events and my LFS.

    Votes: 18 6.5%
  • I wear reef gear primarily for water changes and tank maintenance.

    Votes: 1 0.4%
  • I wear reef gear primarily to relax where I live.

    Votes: 35 12.5%
  • I don’t wear gear from reef brands.

    Votes: 159 57.0%
  • Other.

    Votes: 19 6.8%
Back
Top