Do you have a question on how to do something.
Ask in here.
Paul_Velasco
Posts: 126 Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL
Post
by Paul_Velasco » Mon Feb 15, 2016 9:21 am
Will this work?
Two dosers:
Doser 1 = Turn on at 9:00AM and dose for 2 minutes. Repeat every 4 hours
Doser 2 = Turn on at 9:15AM and dose for 2 minutes. Repeat every 4 hours
Want to make sure I am not overdosing as this will be Amino Acid and do not want to pollute the tank.
Code: Select all
///Code to make Vinegar Dosing Work 4 mins
/// Doser 1
///02.15.16 = Changed to dosing Amino Acid every 4 hrs for 2 mins, on top of hours
///Start at 9:00AM
ReefAngel.DosingPumpRepeat(Box1_Port8,540,240,120);
///Do not turn on Vinegar if lights are off
///02-15-16 = Changed to Dosing AA throughout the day
/// if (hour()<=8 || hour()>21) {
/// ReefAngel.Relay.Off(Box1_Port8);
/// }
//Code to make Magnesium Dosing Work
///Doser 2
///02.15.16 = Changed to dosing Amino Acid every 4 hrs for 2 mins, on 15 of hour
///Start at 9:15AM
ReefAngel.DosingPumpRepeat(Box1_Port4,555,240,120);
lnevo
Posts: 5422 Joined: Fri Jul 20, 2012 9:42 am
Post
by lnevo » Mon Feb 15, 2016 9:33 am
Looks good. It *should* have the right start time, but you do have the 15 minute offset, the 4 hour repeat and the 2 minute runtime.
Paul_Velasco
Posts: 126 Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL
Post
by Paul_Velasco » Mon Feb 15, 2016 9:39 am
What happens after midnight? Does it skip a dose?
lnevo
Posts: 5422 Joined: Fri Jul 20, 2012 9:42 am
Post
by lnevo » Mon Feb 15, 2016 9:56 am
I think you'll get 4 doses at 9am, 1pm, 5pm, and 9pm and the second doser at 1/4 after those.
Roberto, can you confirm. I believe this line of code stops it from overlapping past midnight to start at your first offset.
signed long t=(elapsedSecsToday(now())-((long)OffsetMinute*60));
Relay.Set(DPRelay,(t%((long)RepeatMinute*60))<RunTime && t>=0 );
lnevo
Posts: 5422 Joined: Fri Jul 20, 2012 9:42 am
Post
by lnevo » Mon Feb 15, 2016 9:57 am
If I'm wrong btw, you'll get a dose at 1am and 5am as well. You can block those out like you did in your previous code to be safe too.
rimai
Posts: 12857 Joined: Fri Mar 18, 2011 6:47 pm
Post
by rimai » Mon Feb 15, 2016 10:35 am
I think you need the commented section to avoid the morning doses
Roberto.
lnevo
Posts: 5422 Joined: Fri Jul 20, 2012 9:42 am
Post
by lnevo » Mon Feb 15, 2016 11:31 am
If you want to avoid just midnight you could start at 1am or 5am.
Paul_Velasco
Posts: 126 Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL
Post
by Paul_Velasco » Mon Feb 15, 2016 11:54 am
lnevo wrote: If you want to avoid just midnight you could start at 1am or 5am.
DUH!!! Good call lnevo. I am always in my 'little box' and start things when my lights come on.