Page 1 of 1
Code for Dosing Pumps
Posted: Sun Jun 03, 2012 12:24 pm
by rholly
Hi all,
Could someone please tell me how to set up my dosing pumps with my RA. I am getting the pumps from bulk reef supply. Am I right that I need to only using the plug ins 5 and 6? Can I set it up using the generator? Can I make adjustments using the iPhone app?
thanks for the help,
Ryan
Re: Code for Dosing Pumps
Posted: Sun Jun 03, 2012 1:27 pm
by rimai
You can use them in any port and you can set it up with RAGen or Wizard
Re: Code for Dosing Pumps
Posted: Tue Jun 05, 2012 5:16 am
by rholly
Thanks Roberto. Could I just a couple of lines of code. I already have my codes set, and don't want to have to change everything again in generator. Do you mind supplying me with the code? Does it go in the memory portion of the code or the RA section?
Thanks
Re: Code for Dosing Pumps
Posted: Tue Jun 05, 2012 9:09 am
by rimai
It goes into the RA code.
Code: Select all
ReefAngel.DosingPumpRepeat(Port5,0,60,4);
ReefAngel.DosingPumpRepeat(Port6,5,60,4);
The code above runs Port5 for 4secs every 60 minutes
Port 6 is same thing, but 5 minutes later.
Re: Code for Dosing Pumps
Posted: Wed Jun 06, 2012 7:51 pm
by rossbryant1956
is there any documentation on the dosing pumps available for sale in the store? Do they support separate chemicals on separate ports or are they somehow all part of a single unit. Thx
Re: Code for Dosing Pumps
Posted: Wed Jun 06, 2012 8:15 pm
by rimai
Each pump head is independent of each other.
You can use different chemicals in each head.
Re: Code for Dosing Pumps
Posted: Thu Jun 07, 2012 4:13 pm
by rossbryant1956
Any documentation, pictures, etc. available? I have one BRS-type dosing pump from before I found RA, but this seems like a better solution for the money. I'd like to learn more about them prior to purchase, however. Thx.
Re: Code for Dosing Pumps
Posted: Thu Jun 07, 2012 4:17 pm
by rimai
Re: Code for Dosing Pumps
Posted: Sat Jun 09, 2012 11:19 am
by rholly
Thanks Roberto,
I think I have it working. Is there any way to have it so that I can adjust the time that it is on without having to go into arduino and adjust every time? Currently my code is like this:
ReefAngel.DosingPumpRepeat(Port5,0,60,107);
ReefAngel.DosingPumpRepeat(Port6,10,60,107);
I have them come on 10 minutes apart and run for 107s every 60 minutes.
Thanks,
Ryan
Re: Code for Dosing Pumps
Posted: Sat Jun 09, 2012 11:31 am
by rimai
Do you have the wifi attachment?
Re: Code for Dosing Pumps
Posted: Sat Jun 09, 2012 11:36 am
by rholly
Yes
Re: Code for Dosing Pumps
Posted: Sat Jun 09, 2012 11:36 am
by rholly
I also use a mac and an iPhone, but I do have parallels so I can run windows, it is just more of a pain
Re: Code for Dosing Pumps
Posted: Sat Jun 09, 2012 1:04 pm
by rimai
You can use this:
Code: Select all
ReefAngel.DosingPumpRepeat(Port5,0,InternalMemory.DP1RepeatInterval_read(),InternalMemory.DP1Timer_read());
ReefAngel.DosingPumpRepeat(Port6,10,InternalMemory.DP2RepeatInterval_read(),InternalMemory.DP2Timer_read());
Then you can use the java status app to change those memory locations.
Re: Code for Dosing Pumps
Posted: Sat Jun 09, 2012 2:46 pm
by rholly
Cool. I could also use the reef client on windows, right. Thanks a Lot Roberto.
Ryan
Re: Code for Dosing Pumps
Posted: Mon Jun 25, 2012 5:13 pm
by rossbryant1956
rimai wrote:It goes into the RA code.
Code: Select all
ReefAngel.DosingPumpRepeat(Port5,0,60,4);
ReefAngel.DosingPumpRepeat(Port6,5,60,4);
The code above runs Port5 for 4secs every 60 minutes
Port 6 is same thing, but 5 minutes later.
How would I make it run two days a week for 4 minutes each run? Thx in advance.
Re: Code for Dosing Pumps
Posted: Mon Jun 25, 2012 5:15 pm
by rimai
Which days of the week?
What time?
Re: Code for Dosing Pumps
Posted: Mon Jun 25, 2012 5:30 pm
by rossbryant1956
sunday and wednesday 9pm at nite. thx
Re: Code for Dosing Pumps
Posted: Mon Jun 25, 2012 6:03 pm
by rimai
Try this:
Code: Select all
ReefAngel.Relay.Set(Port5,((weekday()==1||weekday()==4) && hour()==21 && minute()<4))
ReefAngel.Relay.Set(Port6,((weekday()==1||weekday()==4) && hour()==22 && minute()<4))
Re: Code for Dosing Pumps
Posted: Wed Jun 27, 2012 6:16 pm
by rossbryant1956
as far as I can tell...this is why I was watching the relay charts, this bit of code is not working:
Code: Select all
//set up dosing pump one to run twice a week for 4 minutes
ReefAngel.Relay.Set(Box1_Port2,((weekday()==2||weekday()==3||weekday()==4||weekday()==5) && hour()==21 && minute()<4));
Right now it is just plugged into a lamp so I can see it come on, and you'll notice I added some days because of my impatience, but so far nothing. Pls help. Thx
Re: Code for Dosing Pumps
Posted: Wed Jun 27, 2012 6:27 pm
by rimai
Not sure why it is not working, I'm testing here and it does...
It is 18:26 right now here.
I used hour()==18 && minute()<27 and when the minute turned, the port was off.
Re: Code for Dosing Pumps
Posted: Wed Jun 27, 2012 7:30 pm
by rossbryant1956
are you using the weekday strings in your test? I'll try it soon without that to see if it helps. Do you think perhaps a 4 minute run is not enough to be captured by the portal relay charts?
Re: Code for Dosing Pumps
Posted: Wed Jun 27, 2012 7:35 pm
by rossbryant1956
yep, without the weekday strings works like a charm...how might I do that?
Re: Code for Dosing Pumps
Posted: Wed Jun 27, 2012 7:37 pm
by rimai
Yes, I used the weekday just like you had. all days from 2 to 5.
Is you controller date correct?
Re: Code for Dosing Pumps
Posted: Wed Jun 27, 2012 7:39 pm
by rossbryant1956
yes, just checked
Re: Code for Dosing Pumps
Posted: Wed Jun 27, 2012 7:46 pm
by rossbryant1956
this is why I love computers. I just put the date strings back in and now it works...
How is this coded: Sunday 1, Monday 2, etc.?
Re: Code for Dosing Pumps
Posted: Wed Jun 27, 2012 7:54 pm
by rimai
int weekday(); // the weekday now (Sunday is day 1)
Re: Code for Dosing Pumps
Posted: Tue Jul 03, 2012 4:24 pm
by rossbryant1956
okay. I have been testing this for several days (with my lamp, not my pump) and am now willing to state an opinion. LMK if you think my findings are valid.
I changed my days to all days of the week and set the time to run to 25 minutes, and it is showing up on the portal relay charts like clockwork.
I believe the 4 minute run that I need for this batch of chemicals is not long enough for the portal relay charts to catch it. It is probably working just fine, but I don't see it fire, and neither does the portal.
What do you think? Thx
Re: Code for Dosing Pumps
Posted: Tue Jul 03, 2012 4:26 pm
by rimai
Yeap. That's that I think too.