Looking for help with Auto-feeding program (convoluted)

Users Who Are Viewing This Thread (Total: 0, Members: 0, Guests: 0)

techdef

Active Member
View Badges
Joined
May 28, 2020
Messages
161
Reaction score
141
Rating - 0%
0   0   0
Hey friends, trying to port some programming from my old tank and not having much luck.
I have physical buttons I press to initiate feed cycles most of the time. However, I do also have an AFS which covers twice a day if I dont feed. There's a VO which triggers the feed cycle as though I'd pressed the button. I use a VO to prevent the AFS from running if I press my feed button beforehand. For some reason, now when the timer is at the right time, but should ignore it, the pumps are still shutting down, even tho the AFS doesnt run.

Expected Behavior:
Nobody Home, if the tank has not been manually fed (via FeedA, B or Sw1, 2) then V_No_Feed is Off, V_Feeder will turn On at the appropriate time, That turns on V_Button_A which triggers pumps, skimmer etc... AFS runs.

**Somehow, even if V_No_Feed is On, V_Feeder is still coming On. Why??? **

V_No_Feed // A counter to prevent automatic feeding for 12 hours if I feed manually.
Fallback OFF
Set OFF
If FeedA 000 Then ON
If FeedB 000 Then ON
If Sw1 CLOSED Then ON
If Sw2 CLOSED Then ON
Min Time 720:00 Then ON

V_Feeder // The timer for the automatic feedings. Should be disabled by V_No_Feed
Fallback OFF
Set OFF
If Output V_No_Feed = ON Then OFF
If Time 09:40 to 09:41 Then ON
If Time 20:45 to 20:46 Then ON
If Power Apex Off 000 Then OFF

V_Button_A //
Set OFF
If Sw1 CLOSED Then ON
If FeedA 000 Then ON
If Output V_Feeder = ON Then ON
Defer 002:00 Then OFF

AFS // The AFS code (works fine)
OSC 001:30/000:45/000:45 Then ON
If Output V_Feeder = OFF Then OFF
If Output V_No_Feed = ON Then OFF

COR // Pump Code
Fallback OFF
Set Ramp_Up
If Output V_Button_A = ON Then OFF
If Output V_Button_B = ON Then OFF
If Output V_Button_C = ON Then 5
If Output V_Button_D = ON Then OFF
If Output V_Feeder = ON Then OFF
If Output V_PwrOut2min = ON Then PowerOutPum
If Leak CLOSED Then OFF
If Output V_Delay_Cor = ON Then OFF
 
The problem is your sequence of commands in the V_Feeder code:

V_Feeder // The timer for the automatic feedings. Should be disabled by V_No_Feed
Fallback OFF
Set OFF
If Output V_No_Feed = ON Then OFF
If Time 09:40 to 09:41 Then ON
If Time 20:45 to 20:46 Then ON
If Power Apex Off 000 Then OFF

You need to move that line to the bottom:

V_Feeder // The timer for the automatic feedings. Should be disabled by V_No_Feed
Fallback OFF
Set OFF
If Time 09:40 to 09:41 Then ON
If Time 20:45 to 20:46 Then ON
If Power Apex Off 000 Then OFF
If Output V_No_Feed = ON Then OFF

The Apex processes the program top to bottom, and the last line that’s True will set the output state.
 

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