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
46
Reaction score
82
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

HOW MUCH DOES A FISH’S FEEDING REQUIREMENTS AFFECT YOUR STOCKING DECISIONS?

  • A lot! - I avoid fish that require frequent or specialized feeding

    Votes: 22 32.4%
  • Quite a bit, but an automatic feeder can change my answer

    Votes: 10 14.7%
  • It depends on whether my nutrient export can handle it

    Votes: 9 13.2%
  • It depends on how badly I want the fish

    Votes: 14 20.6%
  • Not much. I’m willing to adjust my routine

    Votes: 12 17.6%
  • Not at all. Feeding demands don’t limit my stocking choices

    Votes: 12 17.6%
  • I usually learn about the demanding feeding schedule after buying the fish!

    Votes: 2 2.9%
  • I haven’t really considered this before

    Votes: 4 5.9%
  • Something else (see my comments in the thread)

    Votes: 2 2.9%
Back
Top
Home
Post thread…
Market
What's new