RAGen v1.2.2 - MUST READ for all RAGen Users

Community contributed apps
Post Reply
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RAGen v1.2.2 - MUST READ for all RAGen Users

Post by binder »

The 2 slope functions that are added (ActinicPWMSlope and DaylightPWMSlope) use these memory values:

Code: Select all

    InternalMemory.PWMSlopeStartD_write(10);
    InternalMemory.PWMSlopeEndD_write(95);
    InternalMemory.PWMSlopeDurationD_write(60);
    InternalMemory.PWMSlopeStartA_write(20);
    InternalMemory.PWMSlopeEndA_write(100);
    InternalMemory.PWMSlopeDurationA_write(60);
and they also use the same light schedule (on & off times) as the StandardLights schedule.

So no changes are necessary to the functions.
abhi_123
Posts: 217
Joined: Tue Mar 20, 2012 8:34 am

Re: RAGen v1.2.2 - MUST READ for all RAGen Users

Post by abhi_123 »

Thanks Curt. Btw if i plan to use parabola what changes if i have to make in my current code?
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RAGen v1.2.2 - MUST READ for all RAGen Users

Post by binder »

abhi_123 wrote:Thanks Curt. Btw if i plan to use parabola what changes if i have to make in my current code?
The changes are simple. You would change this:

Code: Select all

ReefAngel.PWM.ActinicPWMSlope();
ReefAngel.PWM.DaylightPWMSlope();
to this:

Code: Select all

ReefAngel.PWM.ActinicPWMParabola();
ReefAngel.PWM.DaylightPWMParabola();
Then reload your code on your controller. That's all that would be needed.
abhi_123
Posts: 217
Joined: Tue Mar 20, 2012 8:34 am

Re: RAGen v1.2.2 - MUST READ for all RAGen Users

Post by abhi_123 »

cool. Thats very simple. :D

one more thing(sorry for troubling you with my newbie question) i will be using pwm fans to control the temp of my heatsink & tank i want to put a conditional code like if the temp of t1 increased the desired value start the fan which is installed on channel 4 in pwm expansion module & gradually decrease its speed depending upon the temp.
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RAGen v1.2.2 - MUST READ for all RAGen Users

Post by binder »

http://forum.reefangel.com/viewtopic.ph ... 170&p=8969

Roberto will have to comment on how he does the gradual increasing.
TanksNStuff
Posts: 188
Joined: Fri Dec 30, 2011 6:57 am

Re: RAGen v1.2.2 - MUST READ for all RAGen Users

Post by TanksNStuff »

binder wrote:
abhi_123 wrote:Thanks Curt. Btw if i plan to use parabola what changes if i have to make in my current code?
The changes are simple. You would change this:

Code: Select all

ReefAngel.PWM.ActinicPWMSlope();
ReefAngel.PWM.DaylightPWMSlope();
to this:

Code: Select all

ReefAngel.PWM.ActinicPWMParabola();
ReefAngel.PWM.DaylightPWMParabola();
Then reload your code on your controller. That's all that would be needed.
Sorry to bring up old topics, but I had a question about the code above and the 1.2.2 libraries.

How would I do this for the PWM Expansion Module channels?

My currently working code (using slope) is as follows:

Code: Select all

ReefAngel.PWM.Channel0PWMSlope(InternalMemory.ActinicOffset_read());
ReefAngel.PWM.Channel1PWMSlope(InternalMemory.ActinicOffset_read());
ReefAngel.PWM.Channel2PWMSlope();
ReefAngel.PWM.Channel3PWMSlope();
I'd like to change it from Slope to Parabola. What's the proper syntax please?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: RAGen v1.2.2 - MUST READ for all RAGen Users

Post by rimai »

Code: Select all

  ReefAngel.PWM.Channel0PWMParabola(InternalMemory.ActinicOffset_read());
  ReefAngel.PWM.Channel1PWMParabola(InternalMemory.ActinicOffset_read());
  ReefAngel.PWM.Channel2PWMParabola();
  ReefAngel.PWM.Channel3PWMParabola();
Roberto.
TanksNStuff
Posts: 188
Joined: Fri Dec 30, 2011 6:57 am

Re: RAGen v1.2.2 - MUST READ for all RAGen Users

Post by TanksNStuff »

Thanks Roberto. That's what I thought it was, but just wanted to be sure.
Post Reply