Page 2 of 2

Re: New DCPump Modes - How to code???

Posted: Wed Feb 04, 2015 4:20 am
by cosmith71
You could also use ShortPulse mode. It's like LongPulse but with duration in ms.

--Colin

Re: New DCPump Modes - How to code???

Posted: Wed Feb 04, 2015 4:21 am
by davaraj
lnevo wrote:
ReefAngel.DCPump.SetMode(TidalSwell 55); and
ReefAngel.DCPump.SetMode(millis();1200>750?50:0);
You need 3 arguments to SetMode separated by a comma. Mode Speed and Duration. The first only has 2 and no comma and the second, that code block represents one argument and it represents a speed.

Try this:

ReefAngel.DCPump.SetMode(TidalSwell,55,0);

ReefAngel.DCPump.SetMode(Constant,millis();1200>750?50:0,0);
Lee,

I realised I had missed the comma in all the wave settings when I posted this on the forum. In my laptop the commas are there. I'll insert codes for TidalSwell and millis and let you know how it compiles and runs the pumps.

Thank you very much.

Dr Davaraj

Re: New DCPump Modes - How to code???

Posted: Wed Feb 04, 2015 4:47 am
by davaraj
lnevo wrote:
ReefAngel.DCPump.SetMode(TidalSwell 55); and
ReefAngel.DCPump.SetMode(millis();1200>750?50:0);
You need 3 arguments to SetMode separated by a comma. Mode Speed and Duration. The first only has 2 and no comma and the second, that code block represents one argument and it represents a speed.

Try this:

ReefAngel.DCPump.SetMode(TidalSwell,55,0);

ReefAngel.DCPump.SetMode(Constant,millis();1200>750?50:0,0);
Lee,

ReefAngel.DCPump.SetMode(Constant,millis();1200>750?50:0,0); gives error, but
ReefAngel.DCPump.SetMode(Constant,millis()%1200>750?50:0,0); compiles without error.

Re: New DCPump Modes - How to code???

Posted: Wed Feb 04, 2015 6:08 am
by lnevo
Should be millis()% i copied and pasted and didnt notice the mistake. Good catch

Re: New DCPump Modes - How to code???

Posted: Sun Feb 08, 2015 8:23 am
by davaraj
I have this code set for Else mode.

ReefAngel.DCPump.SetMode(Else,50,20);

So the pump should ramp up and down from 30% to 70%, randomly. However, mine goes from 30% to 90% . Is there something wrong with the code or is that how the pump will work?

Dr Davaraj

Re: New DCPump Modes - How to code???

Posted: Sun Feb 08, 2015 9:40 am
by rimai
Are you using memory settings set to true or false?

Re: New DCPump Modes - How to code???

Posted: Sun Feb 08, 2015 10:22 am
by lnevo
The DCPump defaults for ElseMode is going to be equal to the speed. So for 50 it will be 50. For anything greater than 50, the speed will be 100-speed.

Re: New DCPump Modes - How to code???

Posted: Sun Feb 08, 2015 10:23 am
by lnevo
case Else:
{
int offset = DCPump.Speed;
if (DCPump.Speed > 50) offset = 100 - DCPump.Speed;


SyncSpeed=ElseMode(DCPump.Speed,offset,true);
AntiSyncSpeed=ElseMode(DCPump.Speed,offset,false);
break;
}

Re: New DCPump Modes - How to code???

Posted: Sun Feb 08, 2015 10:36 am
by cosmith71
That's not really how it's intended to work. The range should be speed plus or minus offset.

Re: New DCPump Modes - How to code???

Posted: Sun Feb 08, 2015 10:38 am
by lnevo
AlanM added ElseMode to the libraries. And yes, I agree with you Colin. What do you think would be a good defaults for ElseMode in the libraries? We can easily modify this.

Re: New DCPump Modes - How to code???

Posted: Sun Feb 08, 2015 3:30 pm
by davaraj
rimai wrote:Are you using memory settings set to true or false?
ReefAngel.DCPump.UseMemory=false;

Re: New DCPump Modes - How to code???

Posted: Mon Feb 09, 2015 8:13 am
by cosmith71
lnevo wrote:AlanM added ElseMode to the libraries. And yes, I agree with you Colin. What do you think would be a good defaults for ElseMode in the libraries? We can easily modify this.
I've got a fix for it. I'll submit it shortly.

--Colin

Re: New DCPump Modes - How to code???

Posted: Sat Apr 25, 2015 2:24 pm
by Smotz
Anyone have any follow up on this? I am having this same problem.