Page 1 of 1

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

Posted: Sun Apr 29, 2012 7:40 am
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.

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

Posted: Sun Apr 29, 2012 7:54 am
by abhi_123
Thanks Curt. Btw if i plan to use parabola what changes if i have to make in my current code?

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

Posted: Sun Apr 29, 2012 7:57 am
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.

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

Posted: Sun Apr 29, 2012 8:03 am
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.

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

Posted: Sun Apr 29, 2012 8:19 am
by binder
http://forum.reefangel.com/viewtopic.ph ... 170&p=8969

Roberto will have to comment on how he does the gradual increasing.

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

Posted: Sat Oct 06, 2012 6:23 pm
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?

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

Posted: Sat Oct 06, 2012 8:03 pm
by rimai

Code: Select all

  ReefAngel.PWM.Channel0PWMParabola(InternalMemory.ActinicOffset_read());
  ReefAngel.PWM.Channel1PWMParabola(InternalMemory.ActinicOffset_read());
  ReefAngel.PWM.Channel2PWMParabola();
  ReefAngel.PWM.Channel3PWMParabola();

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

Posted: Sat Oct 06, 2012 8:27 pm
by TanksNStuff
Thanks Roberto. That's what I thought it was, but just wanted to be sure.