Push button for feed mode.

charlieborg

Active Member
Market
Messages
299
Reaction score
119
Location
Cornelia, Ga.
My apex display powers on, but no info. I figured It was bad. I want to add a push button on my cabinet to put the apex in feed mode. I have the cable that plugs into the unit. I have the newer unit. Can I put the button on the two wires and make that work? I hate trying to find my cell to put it into feed mode.
 
The issue on the apex is that you cannot use a button directly to trigger the built in FEEDx modes so, you have to program it yourself.

Here is how I did it :

1. Name push button switch FOOD (there is no programming on this)

2. Create virtual output - VFEED (Control Type : Advanced)
Configuration
Code:
OSC 000:00/000:30/000:30 Then ON
If Time 00:00 to 08:00 Then OFF
If Time 08:02 to 12:30 Then OFF
If Time 12:32 to 16:30 Then OFF
If Time 16:32 to 00:00 Then OFF
If FeedA 000 Then ON
If Food CLOSED Then ON
If Output AlreadyFed = ON Then OFF
Min Time 002:00 Then ON

3. Create virtual output - AlreadyFed (Control Type : Advanced)
Configuration
Code:
Set OFF
If FeedA 000 Then ON
If Output vFeed = ON Then ON
Min Time 120:00 Then ON

4. Configure Autofeeder
Configuration
Code:
Fallback OFF
Set OFF
If Output vFeed = ON Then ON
If Food CLOSED Then ON

5. Pumps, Skimmer etc. (eg. configure to turn off if in feed mode)
Configuration
Code:
Fallback ON
Set ON
If Pumps CLOSED Then OFF
If Output vFeed = ON Then OFF

6. Vortech profiles etc. - you will need to create a profile say - VorFeed that sets the pumps to the required behavior
Configuration
Code:
Set ON
Set VorConstant
If Sun 000/-360 Then VorLagoon
If Sun 180/-180 Then VorPulse
If Sun 360/-180 Then VorLagoon
If FeedA 000 Then VorFeed
If Food CLOSED Then VorFeed
If Output vFeed = ON Then VorFeed

------------------------------------------------------------------------------------------------

Behaviors (can be modified by tweaking the programming above) :
- Feeds 3 times a day - 8am, 12.30pm, 4.30pm
- Return pump/Skimmer .. turn off for 2 mins during feeding
- Protection from double feeding (max once in 2 hrs)
- Triggerable by FOOD button (switch input)
- Triggerable using APEX app (vFeed)
- Override by directly turning on Feeder (can be used when you want to feed without turning off pumps/skimmer also)

Hope this helps.
 
Hey thanks! I never knew it would be that much code! I'll do it as soon as I get my push-button!
Yes unfortunately.. it’s the only workaround for the lack of the feature that the built in feed modes cannot be triggered using a switch input.

You can simplify by eliminating the already fed functionality if you want ..
 
I'm getting this error after VFEED code?

Send Failed​


//Error: line 7 - Valid keywords following If are Temp, pH, ORP, DO, Cond, Salt, Par, Feed, SwX, FLx, Error, Power, Sun, or Moon // If Food CLOSED Then ON
 
Did you name the push button switch you added to FOOD ? I think the default is sw1..4 ..

Also, try naming it Food instead of FOOD .. I don’t think names are case-sensitive and I think it gives you auto-complete.
 
I gave up on this and bought a 6 Way Apex Switch Toggle Box - Adaptive Reef.
Trying to code it now.
I made a virtual outlet that I named “FeedMode”.

Set OFF
If Sw3 CLOSED Then ON
Defer 015:00 Then OFF

Then uploaded it.

Next I added this to my return pumps, and skimmer.

Fallback ON
Set ON
If Output FeedMode = ON Then OFF
If FeedA 015 Then OFF
If FeedB 015 Then OFF
If FeedC 015 Then OFF
If FeedD 015 Then OFF
Defer 015:00 Then ON

Uploaded this but nothing is happening when I push Sw3?

Is my coding wrong?
 
I gave up on this and bought a 6 Way Apex Switch Toggle Box - Adaptive Reef.
Trying to code it now.
I made a virtual outlet that I named “FeedMode”.

Set OFF
If Sw3 CLOSED Then ON
Defer 015:00 Then OFF

Then uploaded it.

Next I added this to my return pumps, and skimmer.

Fallback ON
Set ON
If Output FeedMode = ON Then OFF
If FeedA 015 Then OFF
If FeedB 015 Then OFF
If FeedC 015 Then OFF
If FeedD 015 Then OFF
Defer 015:00 Then ON

Uploaded this but nothing is happening when I push Sw3?

Is my coding wrong?
There are a couple of issues I am seeing :
1. I think the "defer" statement is not correct.
Test it by removing it and checking if the "FeedMode" virtual outlet is responding to the physical switch first. Once that is behaving, you can then test each of the other appliances (pumps, skimmer ..).
I think using Min Time 015:00 Then ON may be more appropriate (if the wanted behavior is to keep the FeedMode outlet ON for a minimum of 15 mins once triggered)

2. On the pump control code :
I think you want to turn the pump off while the feedmode is active. This is what I would do ..
Fallback ON
Set ON
If Output FeedMode = ON Then OFF
If FeedA Then OFF
If FeedB Then OFF
If FeedC Then OFF
If FeedD Then OFF

Notice the control for how long to stay OFF for is not in the pump control but rather in one place i.e. in the FeedMode outlet.

This is a good article that explains the DEFER/MIN TIME/WHEN statements .. it is counterintuitive ;-), but you are on the right track.

 
Will it matter if I do a copy and paste on this? I know some programs don't like it.

As long as you double check the names of outputs etc. The Neptune programming environment is very rudimentary (albeit with some failures like autocomplete etc.) .. so, easy to get bitten with the risks of copy/paste. It isn’t a lot of code and I recommend getting comfortable with the “fiddling” as you may likely want to further customize as you mature your setup ..
 
What would be the code for a toggle switch to turn off pumps, and skimmer?

Set OFF
If SW1 closed then ON
If SW1 open then OFF
 
The above would be virtual.

Below would be on outlets

Fallback ON
Set ON
If Output FeedMode = ON Then OFF
If FeedA 000 Then OFF
If FeedB 000 Then OFF
If FeedC 000 Then OFF
If FeedD 000 Then OFF
If SW1 Closed Then ON
If SW1 Open Then OFF
 
Ok I got my toggle SW1 AND SW6 working.

Virtual-- all off

Set ON
If SW1 CLOSED Then OFF
If SW1 OPEN Then ON
If SW6 CLOSED Then OFF
If SW6 OPEN Then ON
 
VIRTUAL--ALL OFF (1 AND 6)
Set ON
If SW1 CLOSED Then OFF
IfSW1 OPEN Then ON
If SW6 CLOSED Then OFF
If SW6 OPEN Then ON

OUTLETS

OUTLET RETURN PUMPS—ALL OFF


Fallback ON
Set ON
If SW1 CLOSEDThen OFF
If Sw6 CLOSED Then OFF
If Sw1 CLOSED Then OFF
MinTime 015:00 Then ON
If Sw3 CLOSED Then OFF
Min Time 015:00 ThenON
If Sw4 CLOSED Then OFF
Min Time 015:00 Then ON
If Sw5CLOSED Then OFF
Min Time 015:00 Then ON
If FeedA 015 Then ON
IfFeedB 015 Then ON
If FeedC 015 Then ON
If FeedD 015 Then ON





SKIMMER


Fallback ON
Set ON
If SW1 CLOSEDThen OFF
If Sw6 CLOSED Then OFF
If Sw2 CLOSED Then OFF
MinTime 016:00 Then ON
If Sw3 CLOSED Then OFF
Min Time 016:00 ThenON
If Sw4 CLOSED Then OFF
Min Time 016:00 Then ON
If Sw5 CLOSED Then OFF
Min Time 016:00 Then ON
If FeedA 016 Then ON
IfFeedB 016 Then ON
If FeedC 016 Then ON
If FeedD 016 Then ON

Does look right?
 
I found a bad line, and fixed it. Still not working?


OUTLET RETURN PUMPS—ALL OFF
Fallback ON
Set ON
If SW1 CLOSEDThen OFF
If Sw6 CLOSED Then OFF
If Sw3 CLOSED Then OFF
MinTime 015:00 Then ON
If Sw4 CLOSED Then OFF
Min Time 015:00 ThenON
If Sw5 CLOSED Then OFF
Min Time 015:00 Then ON
If FeedA015 Then ON
If FeedB 015 Then ON
If FeedC 015 Then ON
IfFeedD 015 Then ON

SKIMMER
Fallback ON
Set ON
If SW1 CLOSEDThen OFF
If Sw6 CLOSED Then OFF
If Sw3 CLOSED Then OFF
MinTime 016:00 Then ON
If Sw4 CLOSED Then OFF
Min Time 016:00 ThenON
If Sw5 CLOSED Then OFF
Min Time 016:00 Then ON
If FeedA016 Then ON
If FeedB 016 Then ON
If FeedC 016 Then ON
IfFeedD 016 Then ON
 
OR


RETURN PUMPS

Fallback ON
Set ON
If Sw1 CLOSED Then OFF
If Sw1 OPEN Then ON
If Sw6 CLOSED Then OFF
If Sw6 OPEN Then ON
If Sw3 CLOSED Then OFF
If Sw3 OPEN Then ON
Min Time 015:00 Then ON
If Sw4 CLOSED Then OFF
If Sw4 OPEN Then ON
Min Time 015:00 Then ON
If Sw5 CLOSED Then OFF
If Sw5 OPEN Then ON
Min Time 015:00 Then ON
If FeedA 015 Then ON
If FeedB 015 Then ON
If FeedC 015 Then ON
If FeedD 015 Then ON


SKIMMER

Fallback ON
Set ON
If Sw1 CLOSED Then OFF
If Sw1 OPEN Then ON
If Sw6 CLOSED Then OFF
If Sw6 OPEN Then ON
If Sw3 CLOSED Then OFF
If Sw3 OPEN Then ON
Min Time 016:00 Then ON
If Sw4 CLOSED Then OFF
If Sw4 OPEN Then ON
Min Time 016:00 Then ON
If Sw5 CLOSED Then OFF
If Sw5 OPEN Then ON
Min Time 016:00 Then ON
If FeedA 016 Then ON
If FeedB 016 Then ON
If FeedC 016 Then ON
If FeedD 016 Then ON
 
Couple of things :
- what is the name of the virtual outlet you created ? I would expect a lot of the logic that says if sw1 then on etc would be in the virtual outlet (say FeedMode) and then for pumps etc, you would only have to check for FeedMode.
- multiple min time statements are redundant .. think of the programming as a linear progression of the state of the outlet. The state is stored in a register with each line evaluated sequentially and modifying the state.
 
I figured out one of my problems, I wasn't holding the momentary switch in long enough! Now it's working like it should!
I do have one question, Should Sw2 be highlighted in white? Would this mean the switch is bad or not reading?

I changed the coding some.

"Alloff" (virtual) is for an emergency off of pumps and skimmer

Set ON
If Sw1 CLOSED Then OFF
If Sw1 OPEN Then ON
If Sw6 CLOSED Then OFF
If Sw6 OPEN Then ON

"Feedmode" (virtual) for feeding

Set OFF
If Sw3 CLOSED Then ON
Defer 010:00 Then OFF

My return pumps outlet

Fallback ON
Set ON
If Sw1 CLOSED Then OFF
If Sw1 OPEN Then ON
If Sw6 CLOSED Then OFF
If Sw6 OPEN Then ON
If Sw3 CLOSED Then OFF
Defer 010:00 Then ON

Skimmer outlet

Fallback ON
Set ON
If Sw1 CLOSED Then OFF
If Sw1 OPEN Then ON
If Sw6 CLOSED Then OFF
If Sw6 OPEN Then ON
If Sw3 CLOSED Then OFF
Defer 012:00 Then ON

With the code only one return pump is working right in "alloff"? Got the same code on both.
 
Back
Top