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

Do you have a question on how to do something.
Ask in here.
Post Reply
DavidinGA
Posts: 83
Joined: Fri Jun 07, 2013 11:26 am

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

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

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

Post 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
Roberto.
DavidinGA
Posts: 83
Joined: Fri Jun 07, 2013 11:26 am

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

Post 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);
}
DavidinGA
Posts: 83
Joined: Fri Jun 07, 2013 11:26 am

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

Post by DavidinGA »

?

Sent from my SCH-I605 using Tapatalk 4
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

Post by rimai »

I don't see it anywhere in the code the minute function I mentioned before.
Roberto.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

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

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

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

Post 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?
Roberto.
DavidinGA
Posts: 83
Joined: Fri Jun 07, 2013 11:26 am

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

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

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

Post by rimai »

yes, i think it will..
Try it
Roberto.
DavidinGA
Posts: 83
Joined: Fri Jun 07, 2013 11:26 am

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

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

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

Post by rimai »

Same concept...

Code: Select all

else if ( hour()=12 && (minute()>=30 && minute()<35) )
ReefAngel.DCPump.SetMode( ShortPulse,70,15);
Roberto.
DavidinGA
Posts: 83
Joined: Fri Jun 07, 2013 11:26 am

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

Post by DavidinGA »

Sweet thanks!

Sent from my SCH-I605 using Tapatalk 4
Post Reply