Page 1 of 1

Dosing pump timer

Posted: Sun Dec 21, 2014 9:11 am
by Lionfan
I would like to have my dosing pump (kalk) come on at 10 P.M and dose for 5 secs every hour. Then stop dosing at 0600. How would i code that?

Re: Dosing pump timer

Posted: Sun Dec 21, 2014 9:31 am
by rimai
Try this:

Code: Select all

if (hour()>=10 && hour()<18) ReefAngel.DosingPumpRepeat( Port1,0,60,5 );

Re: Dosing pump timer

Posted: Sun Dec 21, 2014 10:03 am
by Lionfan
rimai wrote:Try this:

Code: Select all

if (hour()>=10 && hour()<18) ReefAngel.DosingPumpRepeat( Port1,0,60,5 );

Thanks! Which part of that is the port assignment?

Re: Dosing pump timer

Posted: Sun Dec 21, 2014 11:10 am
by lnevo
Port1

Re: Dosing pump timer

Posted: Sun Dec 21, 2014 3:39 pm
by Lionfan
"lnevo"]Port1[/quote]
Thanks! I'm learning the code. I take it the " 10" is the start time, the "18" is the end time. And the (0,60,5) is everyday, every 60 minutes, for 5 secs?

Re: Dosing pump timer

Posted: Sun Dec 21, 2014 7:12 pm
by lnevo
Correct the 0 is offset. So 10am, 11am, 12pm, etc. if you wanted it at 10:30, you'd have that be 1800

Dosing pump timer

Posted: Mon Dec 22, 2014 1:33 pm
by Lionfan
Correct the 0 is offset. So 10am, 11am, 12pm, etc. if you wanted it at 10:30, you'd have that be 1800
My mind was just blown. How is 1800 1030?

Re: Dosing pump timer

Posted: Mon Dec 22, 2014 7:07 pm
by lnevo
Because its an offset and I was wrong actually the argument is in minutes not seconds. So if it were seconds it would have been 30 minutes x 60 seconds = 1800. But since I'm wrong it would just be 30.

Re: Dosing pump timer

Posted: Tue Dec 23, 2014 2:56 pm
by Lionfan
lnevo wrote:Because its an offset and I was wrong actually the argument is in minutes not seconds. So if it were seconds it would have been 30 minutes x 60 seconds = 1800. But since I'm wrong it would just be 30.
I think I understand.. This may be alot, but can you explain the code for my dosing pump piece by piece. And when you say "offset" what is that pertaining to? the start time? I R GRUNT

Re: Dosing pump timer

Posted: Tue Dec 23, 2014 4:01 pm
by lnevo
Yes with a 0 offset it goes by the repeat time which in your case is 60 minutes. So its on the hour every hour. If you add a 5 minute offset it would be 10:05, 11:05, etc.

The function takes these arguments.

Port, Offset, Repeat, Time

From the code roberto gave you that translates to:

Port1, 0 offset, every 60 minutes, 5 second time.

You asked originally if the 0 meant every day and it doesn't. So hopefully now you follow what it means

Re: Dosing pump timer

Posted: Wed Dec 24, 2014 6:17 am
by Lionfan
Alright, I get it now. Thanks a ton! Now, my ca and Soda ash are dosing perfectly. This forum is awesome