How to check if dosing pumps are running
-
paintguru
- Posts: 10
- Joined: Sat Apr 12, 2014 4:27 pm
How to check if dosing pumps are running
Quick question. Using the program wizard, I installed two RA dosing pumps and programmed them to run for 9 seconds once/day. Is there a way to tell when/if this is actually occurring? The Portal updates only occur every 5 minutes, so I'm sure it is not catching the activity. Just curious if there is a better way to do this. Thanks.
Last edited by paintguru on Wed Jul 16, 2014 4:25 am, edited 1 time in total.
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
Re: How to check of dosing pumps are running
This is a long thread but I helped someone do just that...i also do it but it involves a bit more. You can look at my dosing code routines to see what I'm doing as well.
http://forum.reefangel.com/viewtopic.php?t=3262#p26140
http://forum.reefangel.com/viewtopic.php?t=3262#p26140
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: How to check of dosing pumps are running
The dosing pump function calculation starts at midnight.
So, your dosing is probably happening at midnight.
If you want to see it in action, we can code it differently, so you can actually see it.
This is piece of code that would do the same thing:
This would turn the relay on at 10:00:00 AM and turn it off at 10:00:09 AM
So, your dosing is probably happening at midnight.
If you want to see it in action, we can code it differently, so you can actually see it.
This is piece of code that would do the same thing:
Code: Select all
if (hour()==10 && minute()==0 and second()<9)
ReefAngel.Relay.On(Port1);
else
ReefAngel.Relay.Off(Port1);
Roberto.
-
paintguru
- Posts: 10
- Joined: Sat Apr 12, 2014 4:27 pm
Re: How to check of dosing pumps are running
Thanks guys. I tried to setup a trigger in the portal to send me an email when those two ports turned on (well when they = 1), but I didn't get anything.
-
paintguru
- Posts: 10
- Joined: Sat Apr 12, 2014 4:27 pm
Re: How to check of dosing pumps are running
Just read through the thread and I think your result is exactly what I'd love to see, a time each day of how long a particular port runs. I noticed a lot of iterations, did you ever come up with a final code to add and where to do it? I don't want to fall down the rabbit hole and relive the threadlnevo wrote:This is a long thread but I helped someone do just that...i also do it but it involves a bit more. You can look at my dosing code routines to see what I'm doing as well.
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
Re: How to check of dosing pumps are running
I'll take a look later, the latest iteration I would say is in my code but that would have some dependencies on a few custom memory locations and be a challenge to integrate unless you know some code. Depends how comfortable you are. I'll see if I can find the latest "independent" code but the problem with that is that it requires a few custom variables minute/second for each pump. Whereas what I use only stores the ml dosed in one custom variable per pump. Let me know which way you want to go and we can focus on that. Let's keep the discussion in this thread for your implementation.
-
paintguru
- Posts: 10
- Joined: Sat Apr 12, 2014 4:27 pm
Re: How to check of dosing pumps are running
I'm perfectly happy knowing how many seconds the pump has run and not convert it to ml. I assume time is an easier variable to deal with. As I believe you were shooting for in the other thread, resetting it once/day would be great.
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
Re: How to check of dosing pumps are running
The prob with seconds is we can only store 255 (or a bit over 4 minutes) before it wraps so we have to store as minutes in one variable and seconds in the other making it harder to graph. Converting to ml we can graph up to 255ml instead. Either way..the minute second logging should be in that thread, i'll find the exact post it should be copy/paste
- cosmith71
- Posts: 1432
- Joined: Fri Mar 29, 2013 3:51 pm
- Location: Oklahoma City
Re: How to check of dosing pumps are running
Here's what I use. This will not track how long the pumps run, but will allow you to see the relay activity in the portal. Note that Box2 doesn't actually exist (use a relay box that you don't have). This is for two pumps. Modify to your needs.
Up top in the globals:
Down in the loop()
--Colin
Up top in the globals:
Code: Select all
#define VirtAlk Box2_Port1
#define VirtCal Box2_Port2
unsigned long LastUpdate1=0;
unsigned long LastUpdate2=0;Down in the loop()
Code: Select all
// Turn on imaginary relays for 5 minutes when dosing pumps activate so Portal can track them
if (ReefAngel.Relay.Status(AlkPump) && LastUpdate1==0)
{
LastUpdate1 = now();
ReefAngel.Relay.On (VirtAlk);
}
if (now() - LastUpdate1 >= 300 && LastUpdate1 != 0)
{
LastUpdate1 = 0;
ReefAngel.Relay.Off (VirtAlk);
}
if (ReefAngel.Relay.Status(CalPump) && LastUpdate2==0)
{
LastUpdate2 = now();
ReefAngel.Relay.On (VirtCal);
}
if (now() - LastUpdate2 >= 300 && LastUpdate2 != 0)
{
LastUpdate2 = 0;
ReefAngel.Relay.Off (VirtCal);
}-
paintguru
- Posts: 10
- Joined: Sat Apr 12, 2014 4:27 pm
Re: How to check of dosing pumps are running
Thanks Colin, I'll try it out!
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
Re: How to check of dosing pumps are running
Thats a cool way to go about it 
- cosmith71
- Posts: 1432
- Joined: Fri Mar 29, 2013 3:51 pm
- Location: Oklahoma City
Re: How to check of dosing pumps are running
Not fancy, but it works! 
--Colin
--Colin
-
paintguru
- Posts: 10
- Joined: Sat Apr 12, 2014 4:27 pm
Re: How to check of dosing pumps are running
Silly question, but I didn't rename my ports, so would I simply rename your "CalPump" and "AlkPump" terms to "Port7" and "Port8" respectively?
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
-
paintguru
- Posts: 10
- Joined: Sat Apr 12, 2014 4:27 pm
Re: How to check of dosing pumps are running
Well it compiled. I will try uploading it a bit later.
-
paintguru
- Posts: 10
- Joined: Sat Apr 12, 2014 4:27 pm
Re: How to check of dosing pumps are running
Looks like it worked! Had a spike at 12am and 1am on both virtual ports, which makes sense as I have a 60m delay between the two. May have to try it for my topoff at some point too. Thanks again for the help!
- cosmith71
- Posts: 1432
- Joined: Fri Mar 29, 2013 3:51 pm
- Location: Oklahoma City
Re: How to check of dosing pumps are running
You're welcome!
--C
--C