Ports indicated as ON, but not energized/Menu not working

New members questions
Post Reply
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Ports indicated as ON, but not energized/Menu not working

Post by btorrenga »

I am trying to build my first custom code, but am struggling to figure out why box0 port2 and box1 port8 are properly shown on the controller display as being ON, however, the ports are actually not energized. Any thoughts?

Additionally, most of my menu functions are not working, such as 8 and 9. They seem to immediately exit back to the main display when I select them.
// Autogenerated file by RAGen (v1.2.2.171), (05/05/2012 12:46)
// RA_050512_1246.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
#define DisplayImages
#define DateTimeSetup
#define VersionMenu
#define wifi
#define RelayExp
#define InstalledRelayExpansionModules 0
#define WDT
#define CUSTOM_MENU
#define CUSTOM_MENU_ENTRIES 9
#define CUSTOM_MAIN
#define COLORS_PDE
#define ENABLE_ATO_LOGGING
#define ENABLE_EXCEED_FLAGS
#define IOEXPANSION
#define FONT_8x8
#define FONT_8x16
#define FONT_12x16
#define NUMBERS_8x8
#define NUMBERS_8x16
#define NUMBERS_12x16
#define NUMBERS_16x16
#define CUSTOM_VARIABLES
*/


#include <ReefAngel_Features.h>
#include <RA_Colors.h>
#include <RA_CustomColors.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 <IO.h>
#include <ReefAngel.h>

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


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

#include <avr/pgmspace.h>
prog_char menu1_label[] PROGMEM = "Feeding";
prog_char menu2_label[] PROGMEM = "Water Change";
prog_char menu3_label[] PROGMEM = "ATO Clear";
prog_char menu4_label[] PROGMEM = "Overheat Clear";
prog_char menu5_label[] PROGMEM = "PH Calibration";
prog_char menu6_label[] PROGMEM = "Date / Time";
prog_char menu7_label[] PROGMEM = "Version";
prog_char menu8_label[] PROGMEM = "Turn ON Skimmer";
prog_char menu9_label[] PROGMEM = "Turn Off Skimmer";
// Group the menu entries together
PROGMEM const char *menu_items[] = {
menu1_label, menu2_label, menu3_label,
menu4_label, menu5_label, menu6_label,
menu7_label, menu8_label, menu9_label
};
    
void MenuEntry1()
{
ReefAngel.FeedingModeStart();
}
void MenuEntry2()
{
ReefAngel.WaterChangeModeStart();
}
void MenuEntry3()
{
ReefAngel.ATOClear();
ReefAngel.DisplayMenuEntry("Clear ATO Timeout");
}
void MenuEntry4()
{
ReefAngel.OverheatClear();
ReefAngel.DisplayMenuEntry("Clear Overheat");
}
void MenuEntry5()
{
ReefAngel.SetupCalibratePH();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry6()
{
ReefAngel.SetupDateTime();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry7()
{
ReefAngel.DisplayVersion();
}
void MenuEntry8()
{
ReefAngel.Relay.On(Box1_Port8);
ReefAngel.Relay.Write();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry9()
{
ReefAngel.Relay.Off(Box1_Port8);
ReefAngel.Relay.Write();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}

void DrawCustomMain()
{
  ReefAngel.LCD.DrawDate(6, 119);
  pingSerial();
  ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params);
  pingSerial();
  // draw main relay
  byte TempRelay = ReefAngel.Relay.RelayData;
  TempRelay &= ReefAngel.Relay.RelayMaskOff;
  TempRelay |= ReefAngel.Relay.RelayMaskOn;
  ReefAngel.LCD.DrawOutletBox(12, 93, TempRelay);
#ifdef RelayExp
  pingSerial();
  // draw 1st expansion relay
  TempRelay = ReefAngel.Relay.RelayDataE[0];
  TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
  TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
  ReefAngel.LCD.DrawOutletBox(12, 105, TempRelay);
#endif  // RelayExp
}
void DrawCustomGraph()
{
  // Change the 45 to adjust the horizontal position of the text
  ReefAngel.LCD.DrawGraph(5, 5);
}

void setup()
{
    // This must be the first line
    ReefAngel.Init(); //Initialize controller
    // Initialize the custom menu
    ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items));

    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port8Bit;
    ReefAngel.FeedingModePortsE[0] = Port4Bit | Port7Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port2Bit | Port4Bit;
    ReefAngel.OverheatShutoffPortsE[0] = Port1Bit | Port2Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port4Bit;
    ReefAngel.LightsOnPortsE[0] = Port1Bit | Port3Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port2Bit | Port8Bit;
    ReefAngel.WaterChangePortsE[0] = Port2Bit | Port8Bit;

    // Ports that are always on
    ReefAngel.Relay.On(Port3);
    ReefAngel.Relay.On(Port8);
    ReefAngel.Relay.On(Box1_Port4);
    ReefAngel.Relay.On(Box1_Port7);
    ReefAngel.Relay.On(Box1_Port8);
    ////// Place additional initialization code below here
    ReefAngel.OverheatProbe = T1_PROBE; // Use Temperature probe 1 to check for overheat

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

void loop()
{
    // Specific functions that use Internal Memory values
    ReefAngel.StandardLights(Port1,23,0,2,0); // Moon lights on 23:00-02:00
    ReefAngel.StandardHeater(Port2,780,790); // 800w heater on at 78.0, off at 79.0
    ReefAngel.MHLights(Port4,14,0,22,0,15); // MH on 14:00-22:00, delay 15m if power fails
    ReefAngel.StandardATO(Port5,120); // Standard ATO with 120s timeout
    ReefAngel.StandardATO(Port6,120); // Standard ATO with 120s timeout
    ReefAngel.StandardLights(Port7,21,0,13,0); // Sump lights on 21:00-13:00
    ReefAngel.MHLights(Box1_Port1,14,0,22,0,15); // MH on 14:00-22:00, delay 15m if power fails
    ReefAngel.StandardHeater(Box1_Port2,785,790); // 250w heater on at 78.5, off at 79.0
    ReefAngel.StandardLights(Box1_Port3,13,0,23,0); // Actinics on 13:00-23:00
    ReefAngel.StandardATO(Box1_Port5,120); // Standard ATO with 120s timeout
    ReefAngel.DosingPumpRepeat(Box1_Port6,0,480,30); //Dose for 30s every 480m, 0m offset
    ////// 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("btorrenga");

    // This should always be the last line
    ReefAngel.ShowInterface();
}
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ports indicated as ON, but not energized/Menu not workin

Post by rimai »

Can you check for this:
On your features file, located at "Documents\Arduino\ReefAngel_Features\ReefAngel_Features.h"
Make sure you have this:

Code: Select all

#define RelayExp
#define InstalledRelayExpansionModules 1
#define WDT
#define CUSTOM_MENU
#define CUSTOM_MENU_ENTRIES 9
Also, is it relays on both main relay box and expanion relay box that don't turn on?
Roberto.
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Ports indicated as ON, but not energized/Menu not workin

Post by btorrenga »

I found the file in "\Documents\Arduino\libraries\ReefAngel_Features", I assume that is the correct one. I changed InstalledRelayExpansionModules 1 and CUSTOM_MENU_ENTRIES 9. Now the menus appear to work based on the controller display. However, box 0 port 2 still shows as being on based on the controller screen, though it is not energized. Also, box 1 port 8 now toggles (as the skimmer in my menu) on/off on the controller screen, but is always energized, even when the screen shows it being off.

I also swapped relay boxes to check for hardware fault. The fault follows the code, not the hardware, so it must be something I have wrong in my code.

Another thing about my code - is my suspicion true that only one port may be defined as standardato?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ports indicated as ON, but not energized/Menu not workin

Post by rimai »

Good.
I'm in the process of changing suppliers of communication cables because I did have a handful of cases of bad communication cable.
Would you be able to also try swapping the cables along with the boxes to confirm?
The ATO function should only be called once, but you can program other ports to follow the ATO port you assigned. I'm looking at your code, you could set Port5 to StandardATO() and have Port6 and Box1_Port5 just mimic Port5. Does it work for you or you had something else in mind?
Roberto.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Ports indicated as ON, but not energized/Menu not workin

Post by binder »

btorrenga wrote:I found the file in "\Documents\Arduino\libraries\ReefAngel_Features", I assume that is the correct one. I changed InstalledRelayExpansionModules 1 and CUSTOM_MENU_ENTRIES 9. Now the menus appear to work based on the controller display. However, box 0 port 2 still shows as being on based on the controller screen, though it is not energized. Also, box 1 port 8 now toggles (as the skimmer in my menu) on/off on the controller screen, but is always energized, even when the screen shows it being off.
That is the correct one. You could also have opened up RAGen and confirmed the settings in the Features tab and pressed Save to force the file to be updated.
Note: Whenever changing the Features file, make sure that Arduino is closed to ensure it reads the files properly.
I also swapped relay boxes to check for hardware fault. The fault follows the code, not the hardware, so it must be something I have wrong in my code.

Another thing about my code - is my suspicion true that only one port may be defined as standardato?
If you try to use it multiple times, then you can have problems with the timers being incorrect thus you have undesired results. If you need to have multiple ports activated and run like the standard ato function, you will need to have a custom function created that mimics the standard ato one.

Here's what you would need to do:
  • Below DrawCustomGraph() and above setup(), place this function:

    Code: Select all

    void MyCustomATO(int ATOTimeout)
    {
    	unsigned long TempTimeout = ATOTimeout;
    	TempTimeout *= 1000;
    
        if ( ReefAngel.LowATO.IsActive() && ( !ReefAngel.LowATO.IsTopping()) )
        {
            ReefAngel.LowATO.Timer = millis();
            ReefAngel.LowATO.StartTopping();
            ReefAngel.Relay.On(Port5);
    		ReefAngel.Relay.On(Port6);
    		ReefAngel.Relay.On(Box1_Port5);
        }
    	
        if ( ReefAngel.HighATO.IsActive() )
        {
    		ReefAngel.LowATO.StopTopping();  // stop the low ato timer
            ReefAngel.Relay.Off(Port5);
    		ReefAngel.Relay.Off(Port6);
    		ReefAngel.Relay.Off(Box1_Port5);
        }
    
    	if ( (millis()-ReefAngel.LowATO.Timer > TempTimeout) && ReefAngel.LowATO.IsTopping() )
    	{
    		ReefAngel.LED.On();
    #ifdef ENABLE_EXCEED_FLAGS
    		InternalMemory.write(ATO_Exceed_Flag, 1);
    #endif  // ENABLE_EXCEED_FLAGS
            ReefAngel.Relay.Off(Port5);
    		ReefAngel.Relay.Off(Port6);
    		ReefAngel.Relay.Off(Box1_Port5);
    #ifdef ENABLE_ATO_LOGGING
    		// bump the counter if a timeout occurs
    		AtoEventCount++;
    		if ( AtoEventCount >= MAX_ATO_LOG_EVENTS ) { AtoEventCount = 0; }
    #endif  // ENABLE_ATO_LOGGING
    	}
    }
    
  • Remove all of the ReefAngel.StandardATO() functions
  • Place this code instead of the StandardATO:

    Code: Select all

    MyCustomATO(120);
This will tie all three of the ports (Port5, Port6, Box1_Port5) together to the StandardATO function and still keep the ATO event logging working.

I've attached the entire INO file for you to use.

One other thing, you have all the values hard coded. This means that if you ever wanted to change the times or values, you will have to manually edit the code file and reload the code. This isn't recommended, especially if you plan on using the Android or iPhone app. There's nothing wrong with how you have things coded, just making suggestions for ease of control.
Attachments
btorrenga.ino
ino file
(7.28 KiB) Downloaded 360 times
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Ports indicated as ON, but not energized/Menu not workin

Post by btorrenga »

Thank you very much for the help guys.

Roberto,

I swapped the cables, like you said, and found interesting results. Calling the cables A and B, in one combination I have perfect results with the main relay box, but troubles with the second. Swapping A and B gives me troubles with both boxes. I will go to the store today and buy another pair of cables and try that out, and then report my findings.

Curt,

Thank you very much for the explanation. When I get an expansion hub, I will tie in my IO expansion and monitor the reservoirs and cut the pumps if there is no water.

Regarding hardcoding my values: I have had a tough time getting the wifi module to play nice. I have updated its firmware and have no problem getting it on my lan. I have forwarded TCP port 2000 no problem. My public IP is setup correctly. However, upon booting, the portal seems to at first get some data. 1 in ten times the temps and PH will populate the portal correctly. None of the relays show any on status, and only one relay box appears. Similar issues with the android app. If I can get the wifi to be stable, then I would like very much to be able to program the values remotely instead of hard coding. Any ideas why the wifi would behave so?
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Ports indicated as ON, but not energized/Menu not workin

Post by binder »

btorrenga wrote: Curt,

Thank you very much for the explanation. When I get an expansion hub, I will tie in my IO expansion and monitor the reservoirs and cut the pumps if there is no water.

Regarding hardcoding my values: I have had a tough time getting the wifi module to play nice. I have updated its firmware and have no problem getting it on my lan. I have forwarded TCP port 2000 no problem. My public IP is setup correctly. However, upon booting, the portal seems to at first get some data. 1 in ten times the temps and PH will populate the portal correctly. None of the relays show any on status, and only one relay box appears. Similar issues with the android app. If I can get the wifi to be stable, then I would like very much to be able to program the values remotely instead of hard coding. Any ideas why the wifi would behave so?
You can still have the values coded with the InternalMemory even though you don't have the wifi module working properly. It's completely up to you truthfully. Regardless, it doesn't matter.

Anyways, as for the wifi issues.
I would suggest removing the Portal line (or commenting it out) first. Then upload your controller software. Test using the android app on your network only. Do not try the public IP and such yet. We need to make sure that your controller works as expected with the wifi interface on your own LAN. The android app only displays one relay box for now (Side Note: I haven't added expansion relays yet, but am working on a way to do it easily). You could have some interference or problems with the wifi module dropping connections and such. I have had problems with a wifi module in the past even with the module only a couple feet from the wifi router with nothing between. Once we can verify it works then we can try the other stuff with the Portal. If there's something wrong with the wifi module, then we can get it fixed for you. Just remember, baby steps. Gotta start from square one and test things little by little with slowly adding pieces in until it fails (hopefully not, but that's how it goes).

So start testing the wifi out on your LAN only with the android app. See if it reads the temperatures properly and that you can toggle relays. Try entering and exiting the feeding and water change modes plus grabbing the version and reading/writing memory locations.
Wifi settings are suggested to run WPA2. Also it's recommended to have a statically assigned IP address from your wifi router.

Give those a shot and we can go from there. Also, I would suggest creating a new topic on the forum for the troubleshooting of the wifi module. To keep things cleaner and easier to follow. :)
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Ports indicated as ON, but not energized/Menu not workin

Post by btorrenga »

rimai wrote:Good.
I'm in the process of changing suppliers of communication cables because I did have a handful of cases of bad communication cable.
Would you be able to also try swapping the cables along with the boxes to confirm?
The ATO function should only be called once, but you can program other ports to follow the ATO port you assigned. I'm looking at your code, you could set Port5 to StandardATO() and have Port6 and Box1_Port5 just mimic Port5. Does it work for you or you had something else in mind?
Ok, I have two new communication cables, but am still getting odd behavior. The controller has some ports that are indicated as being on, some as off, but the actual status is the opposite. I am testing this by plugging in a small lamp to each port. :)

I tried just hard coding all ports to ON for testing purposes. The controller then indicated all ports on. However, there were one or two ports that were not lighting the lamp when plugged in.

I would like to test the hardware. Can you recommend the best way to do so? Or, is my code just possibly screwing something up?
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Ports indicated as ON, but not energized/Menu not workin

Post by btorrenga »

btorrenga wrote: I would like to test the hardware. Can you recommend the best way to do so? Or, is my code just possibly screwing something up?
The following code does not energize port 8 on the main relay, though the controller indicates all ports on both relays are on:

Code: Select all

// Autogenerated file by RAGen (v1.2.2.171), (05/05/2012 12:46)
// RA_050512_1246.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
#define DisplayImages
#define DateTimeSetup
#define VersionMenu
#define wifi
#define RelayExp
#define InstalledRelayExpansionModules 1
#define WDT
#define CUSTOM_MENU
#define CUSTOM_MENU_ENTRIES 9
#define CUSTOM_MAIN
#define COLORS_PDE
#define ENABLE_ATO_LOGGING
#define ENABLE_EXCEED_FLAGS
#define IOEXPANSION
#define FONT_8x8
#define FONT_8x16
#define FONT_12x16
#define NUMBERS_8x8
#define NUMBERS_8x16
#define NUMBERS_12x16
#define NUMBERS_16x16
#define CUSTOM_VARIABLES
*/


#include <ReefAngel_Features.h>
#include <RA_Colors.h>
#include <RA_CustomColors.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 <IO.h>
#include <ReefAngel.h>

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


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

#include <avr/pgmspace.h>
prog_char menu1_label[] PROGMEM = "Feeding";
prog_char menu2_label[] PROGMEM = "Water Change";
prog_char menu3_label[] PROGMEM = "ATO Clear";
prog_char menu4_label[] PROGMEM = "Overheat Clear";
prog_char menu5_label[] PROGMEM = "PH Calibration";
prog_char menu6_label[] PROGMEM = "Date / Time";
prog_char menu7_label[] PROGMEM = "Version";
prog_char menu8_label[] PROGMEM = "Turn ON Skimmer";
prog_char menu9_label[] PROGMEM = "Turn Off Skimmer";
// Group the menu entries together
PROGMEM const char *menu_items[] = {
menu1_label, menu2_label, menu3_label,
menu4_label, menu5_label, menu6_label,
menu7_label, menu8_label, menu9_label
};
    
void MenuEntry1()
{
ReefAngel.FeedingModeStart();
}
void MenuEntry2()
{
ReefAngel.WaterChangeModeStart();
}
void MenuEntry3()
{
ReefAngel.ATOClear();
ReefAngel.DisplayMenuEntry("Clear ATO Timeout");
}
void MenuEntry4()
{
ReefAngel.OverheatClear();
ReefAngel.DisplayMenuEntry("Clear Overheat");
}
void MenuEntry5()
{
ReefAngel.SetupCalibratePH();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry6()
{
ReefAngel.SetupDateTime();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry7()
{
ReefAngel.DisplayVersion();
}
void MenuEntry8()
{
ReefAngel.Relay.On(Box1_Port8);
ReefAngel.Relay.Write();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}
void MenuEntry9()
{
ReefAngel.Relay.Off(Box1_Port8);
ReefAngel.Relay.Write();
ReefAngel.DisplayedMenu = ALT_SCREEN_MODE;
}

void DrawCustomMain()
{
  ReefAngel.LCD.DrawDate(6, 119);
  pingSerial();
  ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params);
  pingSerial();
  // draw main relay
  byte TempRelay = ReefAngel.Relay.RelayData;
  TempRelay &= ReefAngel.Relay.RelayMaskOff;
  TempRelay |= ReefAngel.Relay.RelayMaskOn;
  ReefAngel.LCD.DrawOutletBox(12, 93, TempRelay);
#ifdef RelayExp
  pingSerial();
  // draw 1st expansion relay
  TempRelay = ReefAngel.Relay.RelayDataE[0];
  TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
  TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
  ReefAngel.LCD.DrawOutletBox(12, 105, TempRelay);
#endif  // RelayExp
}
void DrawCustomGraph()
{
  // Change the 45 to adjust the horizontal position of the text 
  ReefAngel.LCD.DrawGraph(5, 5);
}

void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    // Initialize the custom menu
    ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items));

    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port8Bit;
    ReefAngel.FeedingModePortsE[0] = Port4Bit | Port7Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port2Bit | Port4Bit;
    ReefAngel.OverheatShutoffPortsE[0] = Port1Bit | Port2Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port4Bit;
    ReefAngel.LightsOnPortsE[0] = Port1Bit | Port3Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port2Bit | Port5Bit | Port6Bit | Port8Bit;
    ReefAngel.WaterChangePortsE[0] = Port2Bit | Port5Bit | Port6Bit | Port8Bit;

    // Ports that are always on
    ReefAngel.Relay.On(Port1);
    ReefAngel.Relay.On(Port2);
    ReefAngel.Relay.On(Port3);
    ReefAngel.Relay.On(Port4);
    ReefAngel.Relay.On(Port5);
    ReefAngel.Relay.On(Port6);
    ReefAngel.Relay.On(Port7);
    ReefAngel.Relay.On(Port8);
    ReefAngel.Relay.On(Box1_Port1);
    ReefAngel.Relay.On(Box1_Port2);
    ReefAngel.Relay.On(Box1_Port3);
    ReefAngel.Relay.On(Box1_Port4);
    ReefAngel.Relay.On(Box1_Port5);
    ReefAngel.Relay.On(Box1_Port6);
    ReefAngel.Relay.On(Box1_Port7);
    ReefAngel.Relay.On(Box1_Port8);
    ////// Place additional initialization code below here
    ReefAngel.OverheatProbe = T1_PROBE; // Use Temperature probe 1 to check for overheat

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

void loop()
{
    // Specific functions that use Internal Memory values
    //ReefAngel.StandardLights(Port1,23,0,2,0); // Moon lights on 23:00-02:00
    //ReefAngel.StandardHeater(Port2,780,790); // 800w heater on at 78.0, off at 79.0
    //ReefAngel.MHLights(Port4,14,0,22,0,15); // MH on 14:00-22:00, delay 15m if power fails
    //ReefAngel.StandardATO(Port5,120); // Standard ATO with 120s timeout
    //ReefAngel.StandardATO(Port6,120); // Standard ATO with 120s timeout
    //ReefAngel.StandardLights(Port7,21,0,13,0); // Sump lights on 21:00-13:00
    //ReefAngel.MHLights(Box1_Port1,14,0,22,0,15); // MH on 14:00-22:00, delay 15m if power fails
    //ReefAngel.StandardHeater(Box1_Port2,785,790); // 250w heater on at 78.5, off at 79.0
    //ReefAngel.StandardLights(Box1_Port3,13,0,23,0); // Actinics on 13:00-23:00
    //ReefAngel.StandardATO(Box1_Port5,120); // Standard ATO with 120s timeout
    //ReefAngel.DosingPumpRepeat(Box1_Port6,0,480,30); //Dose for 30s every 480m, 0m offset
    ////// Place your custom code below here
    //MyCustomATO(120);
    ////// 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("btorrenga");

    // This should always be the last line
    ReefAngel.ShowInterface();
}
To make things more confusing for, if I swich relay boxes (i.e., swap serial cables at the relay box, and move the USB cable from the first box to the second), then I get different results. In that case, all ports on the (new) main relay box work, but a few ports on the second relay box do not work. This test was done with my two new serial cables. Uggh.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ports indicated as ON, but not energized/Menu not workin

Post by rimai »

You can use the tester code.
File->Sketchbook->Example Codes->ControllerTester
I don't know if the cable you bought really works for RA.
Some vga cables don't have all the 15 pins carried through the cable to reduce cost.
Let me know what you find out with tyhe tester code.


Sent from my SPH-D700 using Tapatalk 2
Roberto.
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: Ports indicated as ON, but not energized/Menu not workin

Post by btorrenga »

Ok, based on using that code I have determined a few things.

1. The cables I bought do not work, as you said they must not be correct. Certain ports work no matter what combination I try.
2. Using one of your cables (call it "cable A"), I can:
A. make all ports on "relay box A" work properly; and
B. make all but port 8 work on "relay box B".
3. Using your other "cable B", I can:
A. make all but port 2 work on "relay box A"; and
B. make all but ports 2 and 8 work on "relay box B".

This tells me that one of the supplied cables is bad, and one of the supplied relay boxes has a bad port 8. Can any other conclusions be drawn?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ports indicated as ON, but not energized/Menu not workin

Post by rimai »

You got pm

Sent from my SPH-D700 using Tapatalk 2
Roberto.
Post Reply