Help with code for DC Pumps

New members questions
Post Reply
Paul_Velasco
Posts: 126
Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL

Help with code for DC Pumps

Post by Paul_Velasco »

Any help with this would be greatly appreciated:

Whenever the mode changes the pumps just shut-off??? Not sure what is going on.
Both pumps are WP-25
I had to extend the wires for the dimming so they would reach the relay box. Checked continuity and nothing broken.

Code: Select all

if (hour()>=6 && hour()<9) {
      ReefAngel.PWM.SetDaylight( LongPulseMode(30,50,10,true) ); // Long pulse hi/low 50%20% 10s pulse on sync mode
      ReefAngel.PWM.SetActinic( LongPulseMode(30,50,10,false) ); // Long pulse hi/low 50%20% 10s pulse on anti-sync mode
    } else if (hour()>=9 && hour()<11) {
      ReefAngel.PWM.SetDaylight( ShortPulseMode(0,60,200,true) ); // Short pulse at 60% with 200ms pulse on sync mode
      ReefAngel.PWM.SetActinic( ShortPulseMode(0,60,200,false) ); // Short pulse at 60% with 200ms pulse on anti-sync mode
    } else if ( (hour()>=11 && hour()<13) && (now()-feeding > SECS_PER_DAY) ) { // We haven't fed today
      ReefAngel.PWM.SetDaylight( NutrientTransportMode(30,60,6000,true) );
      ReefAngel.PWM.SetActinic( NutrientTransportMode(30,60,6000,false) );
    } else if (hour()>=11 && hour()<13) {
      ReefAngel.PWM.SetDaylight( ReefCrestMode(70,20,true) ); // ReefCrest at 70% +/- 20% on sync mode
      ReefAngel.PWM.SetActinic( ReefCrestMode(70,20,false) ); // ReefCrest at 70% +/- 20% on anti-sync mode
    } else if (hour()>=13 && hour ()<15) {
      ReefAngel.PWM.SetDaylight( ShortPulseMode(0,60,200,true) ); // Short pulse at 60% with 200ms pulse on sync mode
      ReefAngel.PWM.SetActinic( ShortPulseMode(0,60,200,false) ); // Short pulse at 60% with 200ms pulse on anti-sync mode
    } else if (hour()>=15 && hour()<17) {
      ReefAngel.PWM.SetDaylight( ReefCrestMode(50,20,true) ); // ReefCrest at 70% +/- 20% on sync mode
      ReefAngel.PWM.SetActinic( ReefCrestMode(50,20,false) ); // ReefCrest at 70% +/- 20% on anti-sync mode  
    } else if (hour()>=17 && hour ()<19) {
      ReefAngel.PWM.SetDaylight( TideMode(50,30,70) ); // TidalSwell at 45% on sync mode
      ReefAngel.PWM.SetActinic( TideMode(50,30,70) ); // TidalSwell at 45% on sync mode
    } else if (hour()>=19 && hour ()<21) {
      ReefAngel.PWM.SetDaylight( TidalSwellMode(45,true) ); // TidalSwell at 45% on sync mode
      ReefAngel.PWM.SetActinic( TidalSwellMode(45,true) ); // TidalSwell at 45% on sync mode
    } else {
      ReefAngel.PWM.SetDaylight( LongPulseMode(30,50,10,true) ); // Long pulse hi/low 50%20% 10s pulse on sync mode
      ReefAngel.PWM.SetActinic( LongPulseMode(30,50,10,false) ); // Long pulse hi/low 50%20% 10s pulse on anti-sync mode
    }
Image
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Help with code for DC Pumps

Post by Sacohen »

Paul;

One thing I noticed it that you have your low set to 20%.
I know that on my WP25 it doesn't like to go below 30%, if it does it will shut off and will only come back on by unplugging it.
Paul_Velasco
Posts: 126
Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL

Re: Help with code for DC Pumps

Post by Paul_Velasco »

Will increase the min when I get home. That sounds exactly what is happening.

BTW - Fellow Floridian in St Cloud, FL. Nice to see some Florida people on this board.
Image
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Help with code for DC Pumps

Post by Sacohen »

These a few of us. You're about 3.5 hrs north if me. We get up there once in a while to go to Disney.

Sent from my HTC One VX using Tapatalk
Paul_Velasco
Posts: 126
Joined: Thu Sep 19, 2013 7:46 am
Location: Saint Cloud, FL

Re: Help with code for DC Pumps

Post by Paul_Velasco »

How is this looking?

Code: Select all

 if (hour()>=6 && hour()<9) {
      ReefAngel.PWM.SetDaylight( LongPulseMode(30,50,10,true) ); // Long pulse hi/low 50%20% 10s pulse on sync mode
      ReefAngel.PWM.SetActinic( LongPulseMode(30,50,10,false) ); // Long pulse hi/low 50%20% 10s pulse on anti-sync mode
    } else if (hour()>=9 && hour()<11) {
      ReefAngel.PWM.SetDaylight( ShortPulseMode(0,60,200,true) ); // Short pulse at 60% with 200ms pulse on sync mode
      ReefAngel.PWM.SetActinic( ShortPulseMode(0,60,200,false) ); // Short pulse at 60% with 200ms pulse on anti-sync mode
    } else if ( (hour()>=11 && hour()<13) && (now()-feeding > SECS_PER_DAY) ) { // We haven't fed today
      ReefAngel.PWM.SetDaylight( NutrientTransportMode(30,60,6000,true) );
      ReefAngel.PWM.SetActinic( NutrientTransportMode(30,60,6000,false) );
    } else if (hour()>=11 && hour()<13) {
      ReefAngel.PWM.SetDaylight( ReefCrestMode(70,20,true) ); // ReefCrest at 70% +/- 20% on sync mode
      ReefAngel.PWM.SetActinic( ReefCrestMode(70,20,false) ); // ReefCrest at 70% +/- 20% on anti-sync mode
    } else if (hour()>=13 && hour ()<15) {
      ReefAngel.PWM.SetDaylight( ShortPulseMode(0,60,200,true) ); // Short pulse at 60% with 200ms pulse on sync mode
      ReefAngel.PWM.SetActinic( ShortPulseMode(0,60,200,false) ); // Short pulse at 60% with 200ms pulse on anti-sync mode
    } else if (hour()>=15 && hour()<17) {
      ReefAngel.PWM.SetDaylight( ReefCrestMode(60,20,true) ); // ReefCrest at 70% +/- 20% on sync mode
      ReefAngel.PWM.SetActinic( ReefCrestMode(60,20,false) ); // ReefCrest at 70% +/- 20% on anti-sync mode  
    } else if (hour()>=17 && hour ()<19) {
      ReefAngel.PWM.SetDaylight( TideMode(70,30,30) ); // TidalSwell at 45% on sync mode
      ReefAngel.PWM.SetActinic( TideMode(70,30,30) ); // TidalSwell at 45% on sync mode
    } else if (hour()>=19 && hour ()<21) {
      ReefAngel.PWM.SetDaylight( TidalSwellMode(45,true) ); // TidalSwell at 45% on sync mode
      ReefAngel.PWM.SetActinic( TidalSwellMode(45,true) ); // TidalSwell at 45% on sync mode
    } else {
      ReefAngel.PWM.SetDaylight( LongPulseMode(30,50,10,true) ); // Long pulse hi/low 50%20% 10s pulse on sync mode
      ReefAngel.PWM.SetActinic( LongPulseMode(30,50,10,false) ); // Long pulse hi/low 50%20% 10s pulse on anti-sync mode
    }
Image
Post Reply