Wave patterns

Related to the development libraries, released by Curt Binder
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave patterns

Post by rimai »

It's in the original post :)
Each function has a different unit. Short Pulse and NTM are milliseconds, but Long Pulse is seconds.
Also, your code is missing one parameter. It's supposed to be 4 total.
Check the original post.
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Wave patterns

Post by Sacohen »

Sorry Roberto. Like I said I'm a complete noob to coding.

It looks like I left out the PulseMinSpeed or PulseMaxSpeed.

So would it be like this?
ReefAngel.PWM.SetDaylight( LongPulseMode(45,70,10,true));
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave patterns

Post by rimai »

Yes :)
You got it :)
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Wave patterns

Post by Sacohen »

Thanks for making me figure it out.
Again "Teach a man to fish".
SaltyGXP
Posts: 24
Joined: Tue Apr 16, 2013 3:25 pm
Location: Ohio

Re: Wave patterns

Post by SaltyGXP »

So I've scanned throughout the last 5 or so pages and didn't see it. Is there ant way we can get Lagoon mode add to the wave patterns?

Thanks
Dustin
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave patterns

Post by rimai »

Well, Lagoon is nothing more than reefcrest with a very close min and max range.
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Wave patterns

Post by Sacohen »

Ok I got most everything setup last night.
There's only a couple of things I need to tackle still, but the first and what seems to be the easiest is hooking up and coding the WP40.

I know all the wave patterns are on the first page (Thank Roberto), but can someone equate them to the different modes on the WP40?

H: High, constant, non-variable flow (13,000 LPH)

L: Low, constant, non-variable flow at a third of the speed (4,300 LPH)

W1: Short pulses which, when timed correctly will create a back and forth motion and form a gentle standing wave in your tank. Adjust the controller to change the speed of the pulses and vary the size of the wave according to your tank.

W2 & W3: Pump gradually speeds up and slows down incrementally to create a varied flow pattern. Adjustable to form the wave best suited to your tank.

Else: Reef Stream Mode, a mixed, changing pattern that creates a random flow cycle similar to what you would find in a natural reef.

I currently use W1 on a slow speed 16-18V and a medium wave length.
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: Wave patterns

Post by coolbird »

Could I just ask as I may be looking at this a bit to simplistically:

I have 2x wp40's that I want to connect to my light ports and for example I want a long pulse minimum power at 10% maximum at 50 lasting for 20 seconds each anti-sync I would enter the below into my loop?

ReefAngel.PWM.SetDaylight( LongPulseMode(10,50,20,true))
ReefAngel.PWM.SetActinic( LongPulseMode(10,50,20,false))

Thanks
Dave
Image
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Wave patterns

Post by Sacohen »

I'm just getting into coding and by no means am an expert, but this looks correct.

The criteria for Long Pulse is...

Long Pulse
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.
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: Wave patterns

Post by coolbird »

Sacohen wrote:I'm just getting into coding and by no means am an expert, but this looks correct.

The criteria for Long Pulse is...

Long Pulse
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.
Hi Sacohen

Its how I see it as well; I should thank you really as you have been asking all the questions I would have put :-)

We will see what the masters of the "black art" say, I hope we are both not mistaken :oops:

Thanks again

Dave
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave patterns

Post by rimai »

coolbird wrote:Could I just ask as I may be looking at this a bit to simplistically:

I have 2x wp40's that I want to connect to my light ports and for example I want a long pulse minimum power at 10% maximum at 50 lasting for 20 seconds each anti-sync I would enter the below into my loop?

ReefAngel.PWM.SetDaylight( LongPulseMode(10,50,20,true))
ReefAngel.PWM.SetActinic( LongPulseMode(10,50,20,false))

Thanks
Dave
Yeap, that's all you need :)
Roberto.
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: Wave patterns

Post by coolbird »

rimai wrote:
coolbird wrote:Could I just ask as I may be looking at this a bit to simplistically:

I have 2x wp40's that I want to connect to my light ports and for example I want a long pulse minimum power at 10% maximum at 50 lasting for 20 seconds each anti-sync I would enter the below into my loop?

ReefAngel.PWM.SetDaylight( LongPulseMode(10,50,20,true))
ReefAngel.PWM.SetActinic( LongPulseMode(10,50,20,false))

Thanks
Dave
Yeap, that's all you need :)
You mean I got something right Roberto :D I will try not to make a habit out of it,,,,,,,thanks
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave patterns

Post by rimai »

Well... Almost there.... You just missed the ; at the end of the 2 lines, but the idea was there and I consider this just a typo.... :mrgreen:
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Wave patterns

Post by lnevo »

I still forget parens, semicolons, braces all the time...thats what compiler errors are for :)
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: Wave patterns

Post by coolbird »

rimai wrote:Well... Almost there.... You just missed the ; at the end of the 2 lines, but the idea was there and I consider this just a typo.... :mrgreen:
Nope Roberto no typo I had missed them off :? serves me right for being smug with my minor success.
Image
User avatar
oscarinw
Posts: 31
Joined: Fri Apr 19, 2013 1:00 pm

Re: Wave patterns

Post by oscarinw »

Hey folks, not trying to hijack your thread here. I need a bit of help with my controllable pump... Still trying to figure out if it's doable and if so how... I can't post links or send private messages I'm such a noob, but if you search for 'Help to connect a certain controllable pump to my ATO DWM' you will find it.
Thanks!
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: Wave patterns

Post by coolbird »

coolbird wrote:
rimai wrote:
coolbird wrote:Could I just ask as I may be looking at this a bit to simplistically:

I have 2x wp40's that I want to connect to my light ports and for example I want a long pulse minimum power at 10% maximum at 50 lasting for 20 seconds each anti-sync I would enter the below into my loop?

ReefAngel.PWM.SetDaylight( LongPulseMode(10,50,20,true))
ReefAngel.PWM.SetActinic( LongPulseMode(10,50,20,false))

Thanks
Dave
Yeap, that's all you need :)
You mean I got something right Roberto :D I will try not to make a habit out of it,,,,,,,thanks
I seem to be missing something here I am using the lines below but I was trying to get the pumps to alternate and as I understand it to do this you need one on false and the other on true (or have I got this wrong,,,again)

Doesn't seem to matter whether I have them false and true or both on true they seem to be coming on for 20 seconds at the set percentage then both dropping back to the reduced powerthen after 20 seconds back up to 30% again!!

ReefAngel.PWM.SetDaylight( LongPulseMode(10,30,20,true));
ReefAngel.PWM.SetActinic( LongPulseMode(10,30,20,false));

Any advice would be welcome.

Thanks
Dave
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave patterns

Post by rimai »

Yes, your code looks correct.
What do you see in the screen for AP/DP?? Are they alternating?
Roberto.
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: Wave patterns

Post by coolbird »

rimai wrote:Yes, your code looks correct.
What do you see in the screen for AP/DP?? Are they alternating?
On the ra screen its just showing the both solid at 30, not changing at all either of them!!

Edit:
When you run through the wizard am i supposed to change anything in the light settings?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave patterns

Post by rimai »

Oh, I know now what is happening.
I don't think the pump can go much lower than 30%.
So, anything lower than 30% is capped at 30%.
If people that have been using this pump can confirm that the pump can indeed go lower than 30%, please let me know and I'll certainly change the libraries.
Roberto.
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: Wave patterns

Post by coolbird »

Can they go to zero then?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave patterns

Post by rimai »

Not with this function.
We can code it differently to get the same results in order to go down to zero.
Roberto.
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: Wave patterns

Post by coolbird »

rimai wrote:Not with this function.
We can code it differently to get the same results in order to go down to zero.
Thanks. For what I have in mind that would be very useful 8-)
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave patterns

Post by rimai »

Use this instead then:

Code: Select all

  byte Jebao=(now()%(20*2)<20?0:30);
  ReefAngel.PWM.SetActinic(Jebao);
  ReefAngel.PWM.SetDaylight(Jebao==0?30:0);
Roberto.
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: Wave patterns

Post by coolbird »

rimai wrote:Use this instead then:

Code: Select all

  byte Jebao=(now()%(20*2)<20?0:30);
  ReefAngel.PWM.SetActinic(Jebao);
  ReefAngel.PWM.SetDaylight(Jebao==0?30:0);
Sorry Roberto how does that code work the parameters, just so I can tweak it

Thanks
Dave
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave patterns

Post by rimai »

This is easier:

Code: Select all

  #define JebaoDuration   20
  #define JebaoMin        0
  #define JebaoMax        30
  byte Jebao=(now()%(JebaoDuration*2)<JebaoDuration?JebaoMin:JebaoMax);
  ReefAngel.PWM.SetActinic(Jebao);
  ReefAngel.PWM.SetDaylight(Jebao==JebaoMin?JebaoMax:JebaoMin);
Change what's in the define section
Roberto.
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: Wave patterns

Post by coolbird »

rimai wrote:This is easier:

Code: Select all

  #define JebaoDuration   20
  #define JebaoMin        0
  #define JebaoMax        30
  byte Jebao=(now()%(JebaoDuration*2)<JebaoDuration?JebaoMin:JebaoMax);
  ReefAngel.PWM.SetActinic(Jebao);
  ReefAngel.PWM.SetDaylight(Jebao==JebaoMin?JebaoMax:JebaoMin);
Change what's in the define section
And what do I do about the lines I have already put in? Sorry its national daft question day in the UK :-)
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave patterns

Post by rimai »

Remove them and replace with the post above
Roberto.
coolbird
Posts: 90
Joined: Thu Apr 18, 2013 2:16 am
Location: Stockport, Cheshire, UK

Re: Wave patterns

Post by coolbird »

rimai wrote:Remove them and replace with the post above
OK will give it a try and let you know

Dave
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wave patterns

Post by rimai »

Thanks for contributing!!!
If I don't hear anyone else, I'll lower it to 25 on the next update.
Roberto.
Post Reply