Apex code writing for feed mode

  • Thread starter Thread starter CaptClay
  • Start date Start date
  • Tagged users Tagged users None

CaptClay

Community Member
View Badges
Joined
Mar 23, 2026
Messages
55
Reaction score
84
Location
Pensacola
What state or country do you live in
Florida
Rating - 0%
0   0   0
I wrote this for my powerheads to turn off when the feeder goes of. My question is will apex read both off times? I have written code for other things real computer stuff. Just not sure on apex code base.
Fallback ON
Set ON
If Time 10:29 to 10:35 Then OFF
If Time 15:59 to 16:05 Then OFF
If FeedA 005 Then OFF
 
Yes. It evaluates top down and will execute the last line to execute as true. Your time ranges don’t over lap and there fore only 1 can be true with the feed an overwriting any time of day when active.
 
Yes. It evaluates top down and will execute the last line to execute as true. Your time ranges don’t over lap and there fore only 1 can be true with the feed an overwriting any time of day when active.
The bottom line has higher priority correct? So feedA will over ride everything if active correct?
 
Yes but in your current case, order really doesn’t matter since you have three independent events and they are all setting the power heads off. Even if you put it first when you turn your feed mode on, they would turn off still. If it ended still within your time ranges. Then they would continue to remain off as at least one time range still evaluate as true and keeps them off. The ordering would become necessary if you had an ON command (not counting the set on) for example it one line read if time between 2-3 then on. Then you would need the feed a to be after otherwise if you tried to activate it between 2-3 nothing would happen as the set on line would over write it.
 
Yes but in your current case, order really doesn’t matter since you have three independent events and they are all setting the power heads off. Even if you put it first when you turn your feed mode on, they would turn off still. If it ended still within your time ranges. Then they would continue to remain off as at least one time range still evaluate as true and keeps them off. The ordering would become necessary if you had an ON command (not counting the set on) for example it one line read if time between 2-3 then on. Then you would need the feed a to be after otherwise if you tried to activate it between 2-3 nothing would happen as the set on line would over write it.
Ok thanks that's what i thought.
 

TOP 10 Trending Threads

WHAT IS THE LOUDEST PART OF YOUR REEF SYSTEM?

  • Return pump

    Votes: 9 5.4%
  • Powerheads or wavemakers

    Votes: 12 7.2%
  • Protein skimmer

    Votes: 27 16.2%
  • Overflow or drain

    Votes: 57 34.1%
  • Sump vibration or plumbing

    Votes: 2 1.2%
  • Cooling fans

    Votes: 11 6.6%
  • Dosing, ATO, or other equipment

    Votes: 11 6.6%
  • Nothing. My reef is surprisingly quiet

    Votes: 26 15.6%
  • Other (Tell us what makes the noise)

    Votes: 12 7.2%
Back
Top
Home
Post thread…
Market
What's new