Page 1 of 1
Help with LongPulseMode
Posted: Tue Dec 03, 2013 7:16 pm
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) );
Re: Help with LongPulseMode
Posted: Tue Dec 03, 2013 8:29 pm
by rimai
Re: Help with LongPulseMode
Posted: Tue Dec 03, 2013 8:37 pm
by Smotz
Sorry Roberto, I am just not picking it up - can you give me a bit more guidance?
Re: Help with LongPulseMode
Posted: Tue Dec 03, 2013 8:40 pm
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.
Re: Help with LongPulseMode
Posted: Tue Dec 03, 2013 8:54 pm
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.
Re: Help with LongPulseMode
Posted: Tue Dec 03, 2013 9:53 pm
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?
Re: Help with LongPulseMode
Posted: Wed Dec 04, 2013 5:39 am
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?
Re: Help with LongPulseMode
Posted: Wed Dec 04, 2013 6:31 am
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..
Re: Help with LongPulseMode
Posted: Wed Dec 04, 2013 8:56 am
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.
Re: Help with LongPulseMode
Posted: Wed Dec 04, 2013 10:13 am
by Smotz
Gotcha. My point is - it wasn't changing. It was staying at the one speed.
using Sinemode now which is working fine.
Re: Help with LongPulseMode
Posted: Wed Dec 04, 2013 10:36 am
by lnevo
Strange...