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
57
Reaction score
86
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.
 

WHEN REEFING GETS TOUGH, WHAT KEEPS YOU MOST INVESTED?

  • My livestock depends on me, so I keep showing up for them

    Votes: 15 55.6%
  • I look for small signs that things are improving

    Votes: 3 11.1%
  • I want to figure out what’s going wrong

    Votes: 1 3.7%
  • I remind myself that rough stretches will pass...just keep reefing

    Votes: 4 14.8%
  • I lean on other reefers for advice or encouragement

    Votes: 0 0.0%
  • I simplify, step back from tinkering, and give the tank time

    Votes: 2 7.4%
  • Honestly, sometimes I wonder if I want to keep going

    Votes: 2 7.4%
  • Other (Post in the comments)

    Votes: 0 0.0%

New Posts

Back
Top
Home
Post thread…
Market
What's new