Ok, so im having trouble with setting up dosing pumps...
Here is what i want to do..
I want to be able to enter my TOTAL daily dosing time in the "runtime" memory spot.
I then want to have my calcium dose that amount evenly, hourly, over the 24hour day, with a 30 minute offset (so 12:30, 1:30, 2:30 etc) (runtime/24hr=hourly dose time.) so for instance if i want 60 minutes of dosing daily, i want calcium to dose 60min/24doses= 2.5min every hour.
What I want for my alkalinity is a little tougher. I want it to dose more at night than during the day. i want it to dose 1/3 of the total from 1PM-1AM, and 2/3 from 1AM to 1PM. I want to do this to try to help level my PH over night. I want it to dose every 30 min.
so from 1PM-1AM i want (60min/3)/24doses=0.83 minutes every 30 min.
and from 1AM-1PM i want ((60min/3)/24doses)*2= 1.66minutes every 30 min.
can i just do what i have below, with the runtime memory set to 3600sec? also, on the android app, which memory location corresponds to that runtime memory location?
// Dosing
//Calcium
ReefAngel.DosingPumpRepeat(Port1,30,60, int RunTime/24);
// Alkalinity
if ( hour() >= 1 || hour () <= 13 )
{
ReefAngel.DosingPumpRepeat(Port8,0,30, ((int RunTime/3)/24)*2);
}
else
{
ReefAngel.DosingPumpRepeat(Port8,0,30,((int RunTime/3)/24));
Sorry if im totally missing something here...
need help with dosing pumps
Re: need help with dosing pumps
I'm afraid the dosing timer memory location is byte size and not int
Even though the function takes int size.
So, you would have to use a custom memory location. Is it ok?
Let's say you pick memory location 150 and store an int size value.
Then, you could use this:
Even though the function takes int size.
So, you would have to use a custom memory location. Is it ok?
Let's say you pick memory location 150 and store an int size value.
Then, you could use this:
Code: Select all
// Dosing
int RunTime = InternalMemory.read_int(15);
//Calcium
ReefAngel.DosingPumpRepeat(Port1,30,60, RunTime/24);
// Alkalinity
if ( hour() >= 1 && hour () <= 13 )
{
ReefAngel.DosingPumpRepeat(Port8,0,30, ((RunTime/3)/24)*2);
}
else
{
ReefAngel.DosingPumpRepeat(Port8,0,30,((RunTime/3)/24));
}
Roberto.
Re: need help with dosing pumps
ya using a memory location is fine, just wasnt sure how to do it, and i wasnt sure if i could do that math in the code or not.
I guess in that case i might as well take it one step farther and make it so i can just enter my dose amount in mL and add to the equation in the code to convert that to seconds. so i could enter 100 for 100ml, and then in the code just add ((runtime/1.1)/60) since the pump is 1.1mL/min
to confirm, for location 150 the code is:
int RunTime = InternalMemory.read_int(15);
or was the (15) supposed to be (150)
so is that code basically just naming internal memory location 150 = "runtime" so when i enter runtime into the code it looks there for the int value?
I guess in that case i might as well take it one step farther and make it so i can just enter my dose amount in mL and add to the equation in the code to convert that to seconds. so i could enter 100 for 100ml, and then in the code just add ((runtime/1.1)/60) since the pump is 1.1mL/min
to confirm, for location 150 the code is:
int RunTime = InternalMemory.read_int(15);
or was the (15) supposed to be (150)
so is that code basically just naming internal memory location 150 = "runtime" so when i enter runtime into the code it looks there for the int value?
Re: need help with dosing pumps
It was a typo Good catch
You need this:
You need this:
Code: Select all
int RunTime = InternalMemory.read_int(150);
Roberto.
Re: need help with dosing pumps
Great, Ill give it a shot tonight.
Thanks for the quick response as always Roberto!
Thanks for the quick response as always Roberto!