How to program a cycle time on Apex

Lousybreed

Well-Known Member
View Badges
Joined
Feb 11, 2017
Messages
837
Reaction score
663
Location
Sussex, WI
Rating - 0%
0   0   0
All I want to do is program a pump I use to dose to turn on for xxx minutes, off for xxx minutes and have it repeat all day long. Can someone tell me what to type? Sorry I am not good with this stuff and I am hoping someone can help me out with this one!!!
 
Use the OSC command:

OSC MMM:SS/MMM:SS/MMM:SS Then ON

The 3 timers dictate the cycle:
  • leading delay
  • active time
  • trailing delay
For example, to run for 5 minutes every hour:

Fallback OFF
OSC 000:00/005:00/055:00 Then ON

Read my tutorial on Apex TImers for more details and examples:
 
Dear @SuncrestReef i have a question. I also want this pump to turn off if it gets above a certain ph. Would the following work?
Fallback Off
If pH > 8.63 Then OFF
If pH < 8.58 Then ON
OSC 000:00/005:00/055:00 Then ON
 
Dear @SuncrestReef i have a question. I also want this pump to turn off if it gets above a certain ph. Would the following work?
Fallback Off
If pH > 8.63 Then OFF
If pH < 8.58 Then ON
OSC 000:00/005:00/055:00 Then ON
Your code won't work because the Apex evaluates each line from top to bottom, and the last line that's True sets the output state. If the case of OSC, it always evaluates True (it's not a conditional command like IF), so regardless of how the If pH lines evaluate, OSC will be the last line that's True and will continue turning the output On and Off on its normal schedule.

You have two options to work around this:

1. Just place a single If pH condition after the OSC to override the OSC schedule when the pH level is too high:

Fallback OFF
OSC 000:00/005:00/055:00 Then ON
If pH > 8.63 Then OFF

- or -

2. If you really want to maintain a range for the pH, use a virtual output to evaluate the lower and upper pH values, then use the status of that virtual output to override the OSC schedule. This would turn off the dosing pump once pH > 8.63, but keep it turned off until the pH finally reduces to below 8.58.

[High_pH] -- virtual output
If pH > 8.63 Then ON
If pH < 8.58 Then OFF

[DosingPump]
Fallback OFF
OSC 000:00/005:00/055:00 Then ON
If Output High_pH = ON Then OFF

If you're not familiar with virtual outputs, see my tutorial here:
 
You are truly skilled. You have no ide how much I appreciate you! I am going on vacation tomorrow. THANK YOU for the fast response. Have a good night!!!
 

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