Page 1 of 1

Can I code my wp40 pumps to make changes by the minute....?

Posted: Sat Oct 19, 2013 6:53 pm
by DavidinGA
Right now I have two jebao wp40 pumps set to change every couple of hours but I was wondering if I could add a line of code to make it change power for a few minutes instead of for a full hour (that's the least amount of time I understand how to change the code to).

For example I wanted to have my pumps run on 100% for say 3 minutes one time during the day to maximize kicking up any missed detritus still sitting in my tank somewhere. I don't want to run at 100% for very long as its to much flow for my oolite sand and most the corals will get unhappy fast lol.


Here is the code I am running now:

Code: Select all

if (hour()<8)
{
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
}
else if (hour()>=8 && hour()<10)
ReefAngel.DCPump.SetMode( ShortPulse,80,20 );
else if (hour()>=10 && hour()<12)
ReefAngel.DCPump.SetMode( LongPulse,65,5 );
else if (hour()>=12 && hour()<14)
ReefAngel.DCPump.SetMode( ShortPulse,70,15);
else if (hour()>=14 && hour()<16)
ReefAngel.DCPump.SetMode( ReefCrest,50,20 );
else if (hour()>=16 && hour()<22)
ReefAngel.DCPump.SetMode( ShortPulse,75,20 );
else
{
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
}


Thanks

Re: Can I code my wp40 pumps to make changes by the minute..

Posted: Sat Oct 19, 2013 7:48 pm
by rimai
You can use minutes too.
The function is minute()
Something like this:

Code: Select all

else if (hour()==12 && minute()<3)
ReefAngel.DCPump.SetMode( ShortPulse,100,15);
This would put the pump into short pulse at 100% between 12:00 and 12:03

Re: Can I code my wp40 pumps to make changes by the minute..

Posted: Sun Oct 20, 2013 12:39 pm
by DavidinGA
So with the given code below would this then run the pumps at 100% from 12 to 12:03 then at 12:04 it would change back into what I have set to run from 12 to 14?

Code: Select all


if (hour()<8)
{
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
}
else if (hour()>=8 && hour()<10)
ReefAngel.DCPump.SetMode( ShortPulse,80,20 );
else if (hour()>=10 && hour()<12)
ReefAngel.DCPump.SetMode( LongPulse,65,5 );
else if (hour()==12 && minute()<3)
ReefAngel.DCPump.SetMode( ShortPulse,100,15);
else if (hour()>=12 && hour()<14)
ReefAngel.DCPump.SetMode( ShortPulse,70,15);
else if (hour()>=14 && hour()<16)
ReefAngel.DCPump.SetMode( ReefCrest,50,20 );
else if (hour()>=16 && hour()<22)
ReefAngel.DCPump.SetMode( ShortPulse,75,20 );
else
{
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
}

Re: Can I code my wp40 pumps to make changes by the minute..

Posted: Mon Oct 21, 2013 4:23 pm
by DavidinGA
?

Sent from my SCH-I605 using Tapatalk 4

Re: Can I code my wp40 pumps to make changes by the minute..

Posted: Mon Oct 21, 2013 5:30 pm
by rimai
I don't see it anywhere in the code the minute function I mentioned before.

Re: Can I code my wp40 pumps to make changes by the minute..

Posted: Mon Oct 21, 2013 5:31 pm
by rimai
never mind...
You should actually invert the order:

Code: Select all

else if (hour()>=12 && hour()<14)
ReefAngel.DCPump.SetMode( ShortPulse,70,15);
else if (hour()==12 && minute()<3)
ReefAngel.DCPump.SetMode( ShortPulse,100,15);

Re: Can I code my wp40 pumps to make changes by the minute..

Posted: Mon Oct 21, 2013 5:32 pm
by rimai
Damn... loosing it... I need to go eat and refresh.... lol.
Disregard my last post... The one you posted should work fine.
Have you tried?

Re: Can I code my wp40 pumps to make changes by the minute..

Posted: Mon Oct 21, 2013 7:00 pm
by DavidinGA
Not yet just curious if I had it right. So it will go to the next hour setting at the 12:04?

Sent from my SCH-I605 using Tapatalk 4

Re: Can I code my wp40 pumps to make changes by the minute..

Posted: Mon Oct 21, 2013 7:05 pm
by rimai
yes, i think it will..
Try it

Re: Can I code my wp40 pumps to make changes by the minute..

Posted: Mon Oct 21, 2013 8:33 pm
by DavidinGA
Awesome it works!

Now is there a code to set it up to change modes within the middle of an hour? The code you gave me seems to only tell it to run from the beginning of the hour for x number of minutes; is there a way for me to tell it to change modes say at 12:30 and run for 5 minutes then revert back to the already set hour mode? This would allow for even more random current changes throughout the day.

Thanks

Re: Can I code my wp40 pumps to make changes by the minute..

Posted: Mon Oct 21, 2013 8:37 pm
by rimai
Same concept...

Code: Select all

else if ( hour()=12 && (minute()>=30 && minute()<35) )
ReefAngel.DCPump.SetMode( ShortPulse,70,15);

Re: Can I code my wp40 pumps to make changes by the minute..

Posted: Mon Oct 21, 2013 10:41 pm
by DavidinGA
Sweet thanks!

Sent from my SCH-I605 using Tapatalk 4