Code for Dosing Pumps

Do you have a question on how to do something.
Ask in here.
Post Reply
rholly
Posts: 13
Joined: Thu Feb 16, 2012 2:56 pm

Code for Dosing Pumps

Post 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
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for Dosing Pumps

Post by rimai »

You can use them in any port and you can set it up with RAGen or Wizard
Roberto.
rholly
Posts: 13
Joined: Thu Feb 16, 2012 2:56 pm

Re: Code for Dosing Pumps

Post 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
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for Dosing Pumps

Post 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.
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: Code for Dosing Pumps

Post 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
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for Dosing Pumps

Post by rimai »

Each pump head is independent of each other.
You can use different chemicals in each head.
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: Code for Dosing Pumps

Post 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.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for Dosing Pumps

Post by rimai »

Roberto.
rholly
Posts: 13
Joined: Thu Feb 16, 2012 2:56 pm

Re: Code for Dosing Pumps

Post 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
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for Dosing Pumps

Post by rimai »

Do you have the wifi attachment?
Roberto.
rholly
Posts: 13
Joined: Thu Feb 16, 2012 2:56 pm

Re: Code for Dosing Pumps

Post by rholly »

Yes
rholly
Posts: 13
Joined: Thu Feb 16, 2012 2:56 pm

Re: Code for Dosing Pumps

Post 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
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for Dosing Pumps

Post 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.
Roberto.
rholly
Posts: 13
Joined: Thu Feb 16, 2012 2:56 pm

Re: Code for Dosing Pumps

Post by rholly »

Cool. I could also use the reef client on windows, right. Thanks a Lot Roberto.
Ryan
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: Code for Dosing Pumps

Post 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.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for Dosing Pumps

Post by rimai »

Which days of the week?
What time?
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: Code for Dosing Pumps

Post by rossbryant1956 »

sunday and wednesday 9pm at nite. thx
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for Dosing Pumps

Post 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))
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: Code for Dosing Pumps

Post 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
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for Dosing Pumps

Post 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.
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: Code for Dosing Pumps

Post 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?
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: Code for Dosing Pumps

Post by rossbryant1956 »

yep, without the weekday strings works like a charm...how might I do that?
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for Dosing Pumps

Post by rimai »

Yes, I used the weekday just like you had. all days from 2 to 5.
Is you controller date correct?
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: Code for Dosing Pumps

Post by rossbryant1956 »

yes, just checked
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: Code for Dosing Pumps

Post by rossbryant1956 »

this is why I love computers. I just put the date strings back in and now it works... :twisted:

How is this coded: Sunday 1, Monday 2, etc.?
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for Dosing Pumps

Post by rimai »

int weekday(); // the weekday now (Sunday is day 1)
Roberto.
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: Code for Dosing Pumps

Post 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
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Code for Dosing Pumps

Post by rimai »

Yeap. That's that I think too.
Roberto.
Post Reply