Apex code writing for feed mode

CaptClay

Community Member
View Badges
Joined
Mar 23, 2026
Messages
46
Reaction score
82
Location
Pensacola
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
 

Tangdora

Well-Known Member
View Badges
Joined
Feb 8, 2020
Messages
743
Reaction score
415
Rating - 0%
0   0   0
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.
 
OP
OP
C

CaptClay

Community Member
View Badges
Joined
Mar 23, 2026
Messages
46
Reaction score
82
Location
Pensacola
Rating - 0%
0   0   0
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?
 

Tangdora

Well-Known Member
View Badges
Joined
Feb 8, 2020
Messages
743
Reaction score
415
Rating - 0%
0   0   0
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.
 
OP
OP
C

CaptClay

Community Member
View Badges
Joined
Mar 23, 2026
Messages
46
Reaction score
82
Location
Pensacola
Rating - 0%
0   0   0
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.
 

DO YOU THINK TECHNOLOGICAL ADVANCEMENTS ARE MORE HELPFUL OR HURTFUL TO REEFING?

  • More helpful.

    Votes: 15 34.1%
  • More hurtful.

    Votes: 3 6.8%
  • I think it depends mostly on the technology.

    Votes: 19 43.2%
  • I think it dependsmostly on the reefer behind the technology.

    Votes: 14 31.8%
Back
Top
Home
Post thread…
Market
What's new