Feed mode with push button

ToLearn

New member
This may be a feature request thread unless there is something out there I am not aware of. I would like to push a momentary push button and start a feed mode. If I feed my tank I would like the return pump to stay off for 10 minutes, my skimmer to stay off for an hour, and my activated carbon reactor to be offline for 2 hours. There is actually more things I would like to manipulate like my alarm for a full sump, calcium reactor feed, zeolite feed, and so on and so forth. For each different time I would want something to stay off for I would have to create a separate virtual outlet.(unless someone knows of another way)

I can't find a way to turn a feed mode on when I press a button. If I could do this I would be able to use a lot less virtual outlets and my code would read a lot simpler. I like using the "If FeedA 005 Then OFF".

If under the e-mail alarm there were outlets called Feed A, B, C, and D then you could turn those on and off using the display as normal or insert code such as:
If Switchx4_4 OPEN Then OFF
If Switchx4_4 CLOSED Then ON
So when you push a button attached to that you could start the feed mode.
 
Do a search. There was a couple of threads on this. I think Todd was the one that laid out the code to do it with some virtual outlets.
 
Yeah search isn't going to help. Tried searching titles of threads with Feed, Button, and Mode and got this thread and nothing else. If I search for threads containing those three words anywhere... I might as well search all of reef central with the word "water".
 
There is not a way to initiate a Feed cycle other than with the display or web interface. However you can effectively create your own.

[Feed_X]
Set OFF
If Switch1 CLOSED Then ON
Defer xxx Then OFF

[Skimmer]
Set ON
.
.
.
If Outlet Feed_X = ON Then OFF
Defer yyy Then ON


Defer xxx sets the baseline feed duration, then yyy sets the additional delay.


Todd
 
With that code if I wanted my return pump to be off for 10 minutes after feeding and my skimmer to be off for three hours after feeding then after a power outage they would do the same. After a power outage I want both the skimmer and return pump running right away with no delay.

This stuff gives me a headache.
 
True. A small UPS paired with a 12VDC adapter would keep the base unit functioning during a power outage. Alternative would be to create a few vitual outlets of defined delays rather than a seperate virtual outlet for each device.

Todd
 
That's what I ended up doing(few virtual outlets of defined delays), but was really hoping I could find a way to use real feed modes.

Now having a problem there. I have three related virtual outlets. One is the virtual outlet that represents the button. It is named FeedButton with the code:

If Switchx4_3 OPEN Then OFF
If Switchx4_3 CLOSED Then ON
Min Time 010:00 Then ON


The others are almost identical:
Name: Feed2After
If Outlet FeedButton = ON Then ON
Min Time 002:00 Then ON

and
Name: Feed60After
If Outlet FeedButton = ON Then ON
Min Time 060:00 Then ON


Problem is that the Feed60After switches into Auto regardless of how long the other two have been off. I haven't built a second break out box so there is no physical button attached to Switchx4_3. If I leave FeedButton in Manual OFF for over an hour Feed60After still kicks ON.

I wish I could tell the status of switches or virtual outlets in the data log, but it appears that data is not logged. Well it has to be somewhere, but isn't displayed on the webpages anywhere.
 
Now I am having an issue with an alarm. I have it send me an e-mail if the "If Outlet TopSumpFloat = OFF Then ON. I am guessing perhaps the e-mail "outlet" plays by a different set of rules then the others?

If Outlet TopSumpFloat = OFF Then ON
If Outlet Feed2After = ON Then OFF

For two minutes after the FeedButton goes back to off the Feed2After should be on and prevent the alarm from going off based on anything chronologically above it, but perhaps the e-mail outlet doesn't care about the order of things and I have to create yet another virtual outlet.
 
I wish I could tell the status of switches or virtual outlets in the data log, but it appears that data is not logged. Well it has to be somewhere, but isn't displayed on the webpages anywhere.
Correct, switch states are not logged. However, Outlets are logged in the XML Outlet page. If you want to monitor or display the status of switches, create a virtual outlet for each one.

Todd
 
Now I am having an issue with an alarm. I have it send me an e-mail if the "If Outlet TopSumpFloat = OFF Then ON. I am guessing perhaps the e-mail "outlet" plays by a different set of rules then the others?

If Outlet TopSumpFloat = OFF Then ON
If Outlet Feed2After = ON Then OFF

For two minutes after the FeedButton goes back to off the Feed2After should be on and prevent the alarm from going off based on anything chronologically above it, but perhaps the e-mail outlet doesn't care about the order of things and I have to create yet another virtual outlet.
I don't believe so, it should behave the same as any other outlet. It's not clear, how is it actually behaving? Is that the entire code for the alarm?

Todd
 
I haven't really tested it too much. I'll play with it more soon.

Set OFF
If Outlet TopSumpFloat = OFF Then ON
If Outlet Feed2After = ON Then OFF
If Outlet XWRONGX = ON Then ON
If Outlet ATO_TooLong = ON Then ON
If Tmpx4 < 78.0 Then ON
If Tmpx4 > 83.1 Then ON
If Temp > 82.2 Then ON
If Temp < 77.0 Then ON
If pH > 08.28 Then ON
If pH < 07.82 Then ON
If pHx4 > 07.30 Then ON
If pHx4 < 06.90 Then ON
If ORP > 480 Then ON
If ORP < 220 Then ON
If Power EB8_5 Off 001 Then ON
If Power Apex Off 001 Then ON
 
I haven't really tested it too much. I'll play with it more soon.

Set OFF
If Outlet TopSumpFloat = OFF Then ON
If Outlet Feed2After = ON Then OFF
If Outlet XWRONGX = ON Then ON
If Outlet ATO_TooLong = ON Then ON
If Tmpx4 < 78.0 Then ON
If Tmpx4 > 83.1 Then ON
If Temp > 82.2 Then ON
If Temp < 77.0 Then ON
If pH > 08.28 Then ON
If pH < 07.82 Then ON
If pHx4 > 07.30 Then ON
If pHx4 < 06.90 Then ON
If ORP > 480 Then ON
If ORP < 220 Then ON
If Power EB8_5 Off 001 Then ON
If Power Apex Off 001 Then ON
 
I haven't really tested it too much. I'll play with it more soon.

Set OFF
If Outlet TopSumpFloat = OFF Then ON
If Outlet Feed2After = ON Then OFF
If Outlet XWRONGX = ON Then ON
If Outlet ATO_TooLong = ON Then ON
If Tmpx4 < 78.0 Then ON
If Tmpx4 > 83.1 Then ON
If Temp > 82.2 Then ON
If Temp < 77.0 Then ON
If pH > 08.28 Then ON
If pH < 07.82 Then ON
If pHx4 > 07.30 Then ON
If pHx4 < 06.90 Then ON
If ORP > 480 Then ON
If ORP < 220 Then ON
If Power EB8_5 Off 001 Then ON
If Power Apex Off 001 Then ON

Try moving it to the very bottom. As it is now, any other condition could override and keep it ON.

Todd
 
If that were the case the top of the e-mails would what the on condition was, even just during testing. I'm also not sure that would work in the long run.

I have a theory as to what is going on, but haven't had a chance to test it. I left the FeedButton in Manual on while I was prepping the food and letting it soak in vitamins and then when I was done hit the feed button into Auto. I think what happened was the FeedButton didn't need to stay on for 10 minutes longer because it had already been on for the minimum of 10 minutes and the same for Feed2After. So what I created was actually Feed for at least 2 minutes not feed 2 after?

Perhaps what I need to do is never leave it in Manual On, just switch on and then back to Auto.(until I get around to building another break out box and button) and then use this:

Name: Feed2After
If Outlet FeedButton = ON Then ON
Min Time 012:00 Then ON


Sorry I have always had an __$ backwards way of thinking about things.
 
Did you add the Set OFF command that Russ mentioned? Without it, the FeedXXAfter outlets will never shut off. You have the same issue in your latest example.

Todd
 
Yeah it's there. I just copied my first code to show the timing I think may be necessary. Soon as he said it, it became obvious.

This code is going to be flaky and not really do what I want it to do for feeding and it would never be able to accomplish what I want for a water change. I won't know how long a water change will take because it will always be different. I'll need to prevent alarms going off for to minutes after the water change because the sump will still be over full.
 
I think what happened was the FeedButton didn't need to stay on for 10 minutes longer because it had already been on for the minimum of 10 minutes and the same for Feed2After.

I went back and read this again. Yes, that is the issue. Min Time is exactly that, a Minimum duration. Once that criteria has been met, it will allow the outlet to change. Conversely, there is no maximum duration. That is why I prefer to use the Defer command. It is a precise duration.

Here is your example using Defer:

[Feed2After]
Set OFF
If Outlet FeedButton = ON Then ON
Defer 2:00 Then OFF

This will hold [Feed2After] in the ON state for two minutes after [FeedButton] changes to OFF.

Todd
 
Back
Top