Apex Code: Use a profile for a minimum amount of time

rsumner

Active Member
View Badges
Joined
Apr 3, 2018
Messages
467
Reaction score
577
Location
Lakeway, TX
Rating - 0%
0   0   0
I'm attempting to program my Apex to reduce the speed of my return pump during a feeding cycle based upon a virtual outlet (that I have named VFEED) and leave it in that ramp profile for about 10 minutes after the feeding. Unfortunately, DEFER and "MIN TIME" only work with ON and OFF and not with profile changes, so I'm struggling.

[VFEED] - this is the virtual outlet
Set OFF
If Time 09:15 to 09:16 Then ON
If Time 12:15 to 12:16 Then ON
If Time 15:15 to 15:16 Then ON
If Time 18:15 to 18:16 Then ON
If FeedA 000 Then ON

[FEEDER] - this is the Neptune AFK
Set OFF
If Output VFEED = ON Then ON
Defer 001:00 Then ON

[RETURN] - this is the variable speed port for my return pump
Fallback RAMP65-85
Set RAMP65-85
If Output VFEED = ON Then 30PCT
Defer 010:00 Then ON <-- THIS DOESN'T KEEP THE PROFILE FOR 10 MIN

My goal in using the virtual outlet is that I can not only control exact times that I want the feeding cycle to start, but I can also still use the feed button manually. Then I can put the delays and specific functions that I want based upon the virtual outlet being powered on in each respective device.

The above code works perfectly fine, however the return pump exits the 30PCT ramp profile exactly 2 minutes after the VFEED virtual outlet comes on. I'm hoping I don't have to add TIME statements into the return pump variable speed config also and have to maintain both it and the VFEED virtual outlet at the same time.

Any ideas? I was thinking I could use another virtual outlet that had its own ON-OFF that I could add a defer or min-time statement to and combine it with the VFEED. I may try that route, but thought I'd see if I could get any short term feedback.

NOTE: Please don't suggest I ask this programming question on Neptunes Forums. I prefer staying right here.
 

RussM

Active Member
View Badges
Joined
Jun 4, 2011
Messages
275
Reaction score
195
Location
El Cajon, CA
Rating - 0%
0   0   0
The simplest solution is to change the If Time statements in VFEED to be ON for 11 or 12 minutes instead of 2. If for some reason this adversely affects other stuff you have programmed, you could use a virtual output as a timer for the return pump's feeding period operation:

[ReturnFeed] // a new VO
Set OFF
If Output VFEED = ON Then ON
Min Time 12:00 Then ON

[RETURN]
Fallback RAMP65-85
Set RAMP65-85
If Output ReturnFeed = ON Then 30PCT
 

ScooterV

Well-Known Member
View Badges
Joined
Nov 1, 2016
Messages
569
Reaction score
1,633
Location
Pensacola, FL
Rating - 0%
0   0   0
I don't feed as often, but effectively do it as Russ stated. Your AFS is still only going to have a single revolution for each regardless, so just make the vfeed time windows longer.
 
OP
OP
rsumner

rsumner

Active Member
View Badges
Joined
Apr 3, 2018
Messages
467
Reaction score
577
Location
Lakeway, TX
Rating - 0%
0   0   0
Thanks, @RussM and @ScooterV! I'm glad to hear you've confirmed my suspicions of needing another virtual outlet. I'll get this implemented. I'm going to use the same strategy when I dose Seachem Reef Plus since it makes my skimmer go nuts. Rather than turning my skimmer (Reef Octopus Regal 150SSS w/VarioS-2 DC pump) completely off, I'm going to turn it back to 50%.
 

ScooterV

Well-Known Member
View Badges
Joined
Nov 1, 2016
Messages
569
Reaction score
1,633
Location
Pensacola, FL
Rating - 0%
0   0   0
Well, actually, my comment along with what Russ said first is you don't really need another virtual. He gave the code if you should want to go that way. Unless you have something other than just the AFS, and stopping or turning down pumps, depending on it all you have to do is change the times in your VFEED.

For example, your first line is:
If Time 09:15 to 09:16 Then ON

Change it to:
If Time 09:15 to 09:26 Then ON

Your AFS will still only make one revolution, but VFEED will remain in an ON state for 10 minutes, so your return will remain at your 30% for that duration before returning to normal as well.
 
OP
OP
rsumner

rsumner

Active Member
View Badges
Joined
Apr 3, 2018
Messages
467
Reaction score
577
Location
Lakeway, TX
Rating - 0%
0   0   0
That's much cleaner, @ScooterV! I did exactly what you suggested and removed the DEFER statements from my powerheads and return pump. I'm going to use the same strategy in creating a new virtual outlet for my skimmer to accommodate the situation when I dose amino acids. I was thinking about putting amino's back on my Neptune DOS, but I think I'll add a push button switch to my IO breakout box instead to reduce the skimmer's DC pump by 15%-ish. I normally run the VarioS2 pump on my Reef Octopus Regal 150SSS on about 85%, but need to drop it down to about 70% for about 24 hours after I dose any kind of amino acids to prevent it from overflowing.
 

Making themselves at home: Have you intentionally done anything in your aquarium to enhance the natural behavior of your fish?

  • I planned my tank to encourage natural fish behavior.

    Votes: 2 14.3%
  • I did some things to encourage natural fish behavior.

    Votes: 4 28.6%
  • Anything that encourages natural fish behavior was a byproduct of the aquascaping.

    Votes: 7 50.0%
  • I did not do anything to encourage natural fish behavior.

    Votes: 0 0.0%
  • Other.

    Votes: 1 7.1%
Back
Top