Help with LongPulseMode

Basic / Standard Reef Angel hardware
Post Reply
Smotz
Posts: 401
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Help with LongPulseMode

Post by Smotz »

Can someone lend a hand? Why isn't this working? It's staying @ 36% & 41%

Code: Select all

    if (wpMode==1) wpWavStr=30;
    if (wpMode==2) wpWavStr=33;
    if (wpMode==3) wpWavStr=36;
//Set the Wave OffSet
    wpWavOff=5;  
    ReefAngel.PWM.SetDaylight( LongPulseMode(wpWavStr,wpWavStr+wpWavOff,6,true) );
    ReefAngel.PWM.SetActinic( LongPulseMode(wpWavStr,wpWavStr+wpWavOff,6,false) );
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Help with LongPulseMode

Post by rimai »

Roberto.
Smotz
Posts: 401
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Re: Help with LongPulseMode

Post by Smotz »

Sorry Roberto, I am just not picking it up - can you give me a bit more guidance?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Help with LongPulseMode

Post by rimai »

Here is the link on that post that explains better the function:
http://forum.reefangel.com/viewtopic.php?f=7&t=2844

byte LongPulseMode(byte PulseMinSpeed, byte PulseMaxSpeed, int PulseDuration, boolean PulseSync)
PulseMinSpeed - % for minimal speed
PulseMaxSpeed - % for maximum speed
PulseDuration - Duration (seconds) in which each pulse will be held. The pump will stay at minimal speed for PulseDuration and will stay at maximum speed for PulseDuration.
PulseSync - true if you want to sync pumps to same cycle. one false and one true if you want to anti-sync pumps.
Roberto.
Smotz
Posts: 401
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Re: Help with LongPulseMode

Post by Smotz »

rimai wrote:Here is the link on that post that explains better the function:
http://forum.reefangel.com/viewtopic.php?f=7&t=2844

byte LongPulseMode(byte PulseMinSpeed, byte PulseMaxSpeed, int PulseDuration, boolean PulseSync)
PulseMinSpeed - % for minimal speed
PulseMaxSpeed - % for maximum speed
PulseDuration - Duration (seconds) in which each pulse will be held. The pump will stay at minimal speed for PulseDuration and will stay at maximum speed for PulseDuration.
PulseSync - true if you want to sync pumps to same cycle. one false and one true if you want to anti-sync pumps.
Yea, no help there. Giving up. Going to a different mode.
Thanks anyway.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Help with LongPulseMode

Post by rimai »

In your code, you are assinging wpWavStr=36 and wpWavOff=5.
Then you are calling the function like this:
LongPulseMode(wpWavStr,wpWavStr+wpWavOff,6,true)
Just replace the variables with the values you are assigning to them and you get this:
LongPulseMode(36,36+5,6,true)
Did you understand now?
Roberto.
Smotz
Posts: 401
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Re: Help with LongPulseMode

Post by Smotz »

rimai wrote:In your code, you are assinging wpWavStr=36 and wpWavOff=5.
Then you are calling the function like this:
LongPulseMode(wpWavStr,wpWavStr+wpWavOff,6,true)
Just replace the variables with the values you are assigning to them and you get this:
LongPulseMode(36,36+5,6,true)
Did you understand now?
I get that. so this "LongPulseMode(36,36+5,6,true)" is a valid statement and should translate to long pulse with 36 min, 41 max for 6 seconds each - no?

So why is the wave pattern static and not changing speeds?
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Help with LongPulseMode

Post by lnevo »

It should go 36 to 41 and then 36 again. When one pump is at 36 the other should be at 41 and vice versa. I believe..
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Help with LongPulseMode

Post by rimai »

Correct. 36 min, 41 max for 6 seconds each pulse.
It goes to 36% stays at 36% for 6 seconds and then goes to 41% and stays at 41% for 6 seconds and repeats the cycle.

PulseDuration - Duration (seconds) in which each pulse will be held. The pump will stay at minimal speed for PulseDuration and will stay at maximum speed for PulseDuration.
Roberto.
Smotz
Posts: 401
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Re: Help with LongPulseMode

Post by Smotz »

Gotcha. My point is - it wasn't changing. It was staying at the one speed.

using Sinemode now which is working fine.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Help with LongPulseMode

Post by lnevo »

Strange...
Post Reply