Page 1 of 1

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

Posted: Thu Apr 05, 2012 6:59 am
by dmolton
rimai wrote:I liked the old format too, but the problem was that there is an increasing number of memory locations and it would become too big for one window.
Maybe a tab system just like the RAGen tabs? One for standard settings like lights, heater and ato and then one for the additional settings, and then one for each expansion module?
Just a thought.
Yes, definitely. I noticed quite a few extra memory locations I didn't recognize initially on the drop down. I didn't mean to be overly critical or too harsh in anyway. Having 1 form with 100 options scattered all over the place is also not a very good solution. I think either a tabbed control or maybe an accordion style control similar to what you have on the portal dashboard would be a good way to show/hide what a user cares about at any given time. I'm still glad that RAGen is actively being worked on and evolving because I think it's the best application available for the RA bar none.

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

Posted: Fri Apr 06, 2012 3:20 pm
by binder
Yeah Dave & I have had a lengthy discussion about the Internal Memory page. I do have some more ideas about improving it.

The comments were not too harsh, but they were rather hysterical. ;) The nice thing was that constructive criticism was given and suggestions for improvements. Commenting truthfully on things can be a bit touchy at times but it's definitely needed and appreciated.

One thing that I thought of as well, is to put a "Preview" button on the form. This would generate a "document" (just a bunch of text inside another window) that displays all of the memory settings. This way you could "preview" it before you generate the memory file. It would be a general overview that you could glance at all the settings and figure out what needs to be changed (if anything). This could be a temporary "fix" until I can devote time to improving it. Any thoughts on this??

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

Posted: Sat Apr 07, 2012 3:31 pm
by rossbryant1956
how do I get the new app? Is it on the download site? TIA

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

Posted: Sat Apr 07, 2012 4:24 pm
by Sebyte

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

Posted: Sun Apr 08, 2012 9:58 am
by rossbryant1956
should I uninstall the earlier version or just install over? Thx

Okay, so I looked..there is nothing to uninstall...there is also no setup.exe.

Do I just copy these files into the right directories?

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

Posted: Sun Apr 08, 2012 10:23 am
by Sebyte
It is always best practice to remove previous versions of any application before you install new. Most applications will leave behind files which hold user set up references, and they will then apply them to the new version. I believe that RAgen will do this too.

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

Posted: Sun Apr 08, 2012 10:40 am
by binder
rossbryant1956 wrote:should I uninstall the earlier version or just install over? Thx

Okay, so I looked..there is nothing to uninstall...there is also no setup.exe.

Do I just copy these files into the right directories?
You just need to download the RAGen-v122-static.zip file (http://curtbinder.info/apps/RAGen-v122-static.zip). Unzip the file and you will have RAGen.exe. Overwrite the RAGen.exe file that is located in the c:\Program Files\Reef Angel Controller (or Program Files (x86)).
Just copy / paste to overwrite. Make sure that you have RAGen closed when you copy & paste, otherwise it will give you an error. :)

That's all that it takes to update it.

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

Posted: Sun Apr 29, 2012 7:11 am
by abhi_123
Hi Curt.

suppose if i want to use pwm parabola function instead of slope than also we have to enter the values in internal memory.

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

Posted: Sun Apr 29, 2012 7:15 am
by binder
abhi_123 wrote:Hi Curt.

suppose if i want to use pwm parabola function instead of slope than also we have to enter the values in internal memory.
The pwm slope and parabola both use the same internal memory locations. So you would need to have the internal memory locations set if you wanted to use the short forms of them. You can always use the long forms and manually add in your values, but doing this will not allow you to update them without reloading your code.

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

Posted: Sun Apr 29, 2012 7:34 am
by abhi_123
This is my test internal memory code which i have generated.
// Autogenerated file by RAGen (v1.2.2.171), (04/29/2012 19:59)
// Memory_042912_1959.ino
//
// This file sets the default values to the Internal Memory
//


#include <ReefAngel_Features.h>
#include <Globals.h>
#include <Time.h>
#include <OneWire.h>
#include <RA_NokiaLCD.h>
#include <avr/pgmspace.h>
#include <InternalEEPROM.h>
#include <Wire.h>
#include <Memory.h>


RA_NokiaLCD e;

void setup()
{
    e.Init();
    e.Clear(COLOR_WHITE,0,0,132,132);
    e.BacklightOn();

    InternalMemory.MHOnHour_write(8);
    InternalMemory.MHOnMinute_write(0);
    InternalMemory.MHOffHour_write(16);
    InternalMemory.MHOffMinute_write(16);
    InternalMemory.StdLightsOnHour_write(8);
    InternalMemory.StdLightsOnMinute_write(0);
    InternalMemory.StdLightsOffHour_write(16);
    InternalMemory.StdLightsOffMinute_write(15);
    InternalMemory.WM1Timer_write(90);
    InternalMemory.WM2Timer_write(200);
    InternalMemory.DP1Timer_write(10);
    InternalMemory.DP2Timer_write(10);
    InternalMemory.FeedingTimer_write(900);
    InternalMemory.LCDTimer_write(600);
    InternalMemory.OverheatTemp_write(1500);
    InternalMemory.LEDPWMDaylight_write(70);
    InternalMemory.LEDPWMActinic_write(75);
    InternalMemory.HeaterTempOn_write(780);
    InternalMemory.HeaterTempOff_write(791);
    InternalMemory.ChillerTempOn_write(810);
    InternalMemory.ChillerTempOff_write(785);
    InternalMemory.ATOTimeout_write(75);
    InternalMemory.PHMax_write(840);
    InternalMemory.PHMin_write(550);
    InternalMemory.MHDelay_write(5);
    InternalMemory.DP1OnHour_write(20);
    InternalMemory.DP1OnMinute_write(0);
    InternalMemory.DP2OnHour_write(22);
    InternalMemory.DP2OnMinute_write(30);
    InternalMemory.ATOHourInterval_write(0);
    InternalMemory.ATOHighHourInterval_write(0);
    InternalMemory.ATOHighTimeout_write(60);
    InternalMemory.DP1RepeatInterval_write(0);
    InternalMemory.DP2RepeatInterval_write(0);
    InternalMemory.SalMax_write(2550);
    InternalMemory.PWMSlopeStartD_write(10);
    InternalMemory.PWMSlopeEndD_write(95);
    InternalMemory.PWMSlopeDurationD_write(60);
    InternalMemory.PWMSlopeStartA_write(20);
    InternalMemory.PWMSlopeEndA_write(100);
    InternalMemory.PWMSlopeDurationA_write(60);
    InternalMemory.RFMode_write(0);
    InternalMemory.RFSpeed_write(100);
    InternalMemory.RFDuration_write(10);
    InternalMemory.PWMSlopeStart0_write(15);
    InternalMemory.PWMSlopeEnd0_write(100);
    InternalMemory.PWMSlopeDuration0_write(60);
    InternalMemory.PWMSlopeStart1_write(15);
    InternalMemory.PWMSlopeEnd1_write(100);
    InternalMemory.PWMSlopeDuration1_write(60);
    InternalMemory.PWMSlopeStart2_write(15);
    InternalMemory.PWMSlopeEnd2_write(100);
    InternalMemory.PWMSlopeDuration2_write(60);
    InternalMemory.PWMSlopeStart3_write(15);
    InternalMemory.PWMSlopeEnd3_write(100);
    InternalMemory.PWMSlopeDuration3_write(60);
    InternalMemory.PWMSlopeStart4_write(15);
    InternalMemory.PWMSlopeEnd4_write(100);
    InternalMemory.PWMSlopeDuration4_write(60);
    InternalMemory.PWMSlopeStart5_write(15);
    InternalMemory.PWMSlopeEnd5_write(100);
    InternalMemory.PWMSlopeDuration5_write(60);
    InternalMemory.IMCheck_write(0x5241494D);
}

void loop()
{
    // display success screen
    e.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*2, "Internal Memory Set");
    e.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*4, "Now load your");
    e.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*5, " RA code file");
    delay(5000);
}
and this is my first code
// Autogenerated file by RAGen (v1.2.2.171), (04/29/2012 20:02)
// RA_042912_2002.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
#define DisplayLEDPWM
#define wifi
#define SIMPLE_MENU
#define PWMEXPANSION
#define CUSTOM_MAIN
#define ENABLE_ATO_LOGGING
#define SALINITYEXPANSION
#define ORPEXPANSION
#define FONT_8x8
*/


#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <Salinity.h>
#include <ORP.h>
#include <ReefAngel.h>

////// Place global variable code below here


////// Place global variable code above here

void DrawCustomMain()
{
    // the graph is drawn/updated when we exit the main menu &
    // when the parameters are saved
    ReefAngel.LCD.DrawDate(6, 112);
    pingSerial();
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params);
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
    pingSerial();
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox(12, 93, TempRelay);
}

void DrawCustomGraph()
{
    ReefAngel.LCD.DrawGraph(5, 5);
}


void setup()
{
    // This must be the first line
    ReefAngel.Init(); //Initialize controller

    // Ports that are always on
    ReefAngel.Relay.On(Port3);
    ReefAngel.Relay.On(Port7);
    ReefAngel.Relay.On(Port8);
    ////// Place additional initialization code below here
    

    ////// Place additional initialization code above here
}

void loop()
{
    // Specific functions that use Internal Memory values
    ReefAngel.StandardATO(Port1);
    ReefAngel.StandardLights(Port2);
    ReefAngel.StandardFan(Port4);
    ReefAngel.Wavemaker1(Port5);
    ReefAngel.Wavemaker2(Port6);

    // PWMSlope based on Internal Memory values for Standard Lights
    ReefAngel.PWM.ActinicPWMSlope();
    ReefAngel.PWM.DaylightPWMSlope();
    ////// Place your custom code below here
    

    ////// Place your custom code above here
    // This sends all the data to the portal
    // Do not add any custom code that changes any relay status after this line
    // The only code after this line should be the ShowInterface function
    ReefAngel.Portal("abhi_123");

    // This should always be the last line
    ReefAngel.ShowInterface();
}

here in my code there is no value assigned for pwm slope. should i manually enter the value or it will work default on values entered in internal memory?

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.