Page 1 of 1
Problem with ports
Posted: Tue Oct 30, 2012 7:08 am
by lartho6
finally got everything up and running, but i noticed last night that the lights are not turning off ports 4,5,6,7 Also port 8 is not turning on which is the return pump port i have that set to always be on. I turned off the lights manually which they did turn off, and on again. I turned the off for the night and only one came on this morning. everything else seems to be working right
Re: Problem with ports
Posted: Tue Oct 30, 2012 8:13 am
by rimai
can you post your code?
Re: Problem with ports
Posted: Tue Oct 30, 2012 10:52 am
by lartho6
#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 <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 845 );
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port2,19,0,12,45 );
ReefAngel.StandardLights( Port3,7,0,12,37 );
ReefAngel.StandardLights( Port4,12,49,12,40 );
ReefAngel.StandardLights( Port5,12,51,12,46 );
ReefAngel.StandardHeater( Port8,726,830 );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "lartho6" );
ReefAngel.ShowInterface();
}
i tried to redo it just now but with different times to see if it turns off and on. it did work. port 1 hadnt came back on which it did work yesterday before we got it up and running.. It says that its on but it isnt working.
Re: Problem with ports
Posted: Tue Oct 30, 2012 11:10 am
by rimai
Your code is not what you said above...
Look at the code lines for always on:
Code: Select all
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
And your functions:
Code: Select all
ReefAngel.StandardLights( Port2,19,0,12,45 );
ReefAngel.StandardLights( Port3,7,0,12,37 );
ReefAngel.StandardLights( Port4,12,49,12,40 );
ReefAngel.StandardLights( Port5,12,51,12,46 );
ReefAngel.StandardHeater( Port8,726,830 );
Are you sure you are not looking at the wrong ports?
Please look at the manual for port assignments.
The Client has a port assignment of the very first gen relay box. All the 2nd gen boxes got the ports reassigned.
Re: Problem with ports
Posted: Tue Oct 30, 2012 12:08 pm
by lartho6
yes i know rob i did them over to make sure it wasnt me.. or something i did wrong because i noticed that. port numbers on the RA manual and the port assignments on the settings of the RA wizard are different.I noticed it yesterday so i reset the code And thats when the 1st port stopped.. and the others had issues.. So i did it over again and thats what code i sent just now.. Port 1 is always on, it wont come on at all, and when i unplug the wifi to set a code ports 3,6,8 turn off. The functions i just sent ports 2 thru 5 work fine now,
Re: Problem with ports
Posted: Tue Oct 30, 2012 1:45 pm
by rimai
Do you have gen 1 or gen2 relay box?
Can you post a photo?
Re: Problem with ports
Posted: Tue Oct 30, 2012 2:12 pm
by lartho6
im not sure i just ordered it the other day from you..
Re: Problem with ports
Posted: Tue Oct 30, 2012 2:23 pm
by rimai
Oh, you got gen 2 then.
The wizard and manual does have the same port assignment.
Re: Problem with ports
Posted: Tue Oct 30, 2012 2:56 pm
by lartho6
ok.. i dont know i must be confused i see in the manual 1 is ATO, 2 is moon lights 8 is Return pump, 10 is the communication connector and then on my Client in settings the communication connector is facing me and 8 is on the opposite side of that top right and 1 is closet to the communication connectors. im confused. But i it did go off using the code i sent. but the one thats labeled port 1 on Client will not come on. and when i unplug the wifi 2 ports stop working
Re: Problem with ports
Posted: Tue Oct 30, 2012 3:15 pm
by dbmet
Is this what your looking at in the manual?
Re: Problem with ports
Posted: Tue Oct 30, 2012 3:25 pm
by lartho6
yes
Re: Problem with ports
Posted: Tue Oct 30, 2012 3:43 pm
by rimai
That's what I am saying...
The client has old photo as it has not been updated for a very long time.
Use the one in the manual or wizard. Those are the correct ones.
Re: Problem with ports
Posted: Tue Oct 30, 2012 3:54 pm
by dbmet
Also tell Us what you have plugged in to which ports..
Re: Problem with ports
Posted: Tue Oct 30, 2012 3:58 pm
by lartho6
ok so with that being said. port 8 is not working at all even though its on
Re: Problem with ports
Posted: Tue Oct 30, 2012 4:02 pm
by rimai
Can you use the ControllerTesterCode and check?
File->Sketchbook->Example Codes->ControllerTesterCode
Re: Problem with ports
Posted: Tue Oct 30, 2012 4:24 pm
by lartho6
#include <Salinity.h>
#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 <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>
int port=0;
void setup()
{
ReefAngel.Init();
}
void loop()
{
/*
This code will display:
Temperature probes
pH probe
Daylight PWM % (if the feature is enabled)
Actinic PWM % (if the feature is enabled)
Relay box
Time/Date
ATO port status
It will blink the red status LED and increment the PWM % every second.
Moving or pressing the joystick will activate another port in the relay box.
*/
if (ReefAngel.Joystick.IsUp() || ReefAngel.Joystick.IsRight()) port++;
if (ReefAngel.Joystick.IsButtonPressed()) port++;
if (ReefAngel.Joystick.IsDown() || ReefAngel.Joystick.IsLeft()) port--;
if (port>7) port=0;
if (port<0) port=7;
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,15,10,"Port On");
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,45,10,port+1);
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,15,20,"Low ATO");
if (ReefAngel.LowATO.IsActive())
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,65,20,"Closed");
else
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,65,20,"Open ");
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,15,30,"High ATO");
if (ReefAngel.HighATO.IsActive())
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,70,30,"Closed");
else
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,70,30,"Open ");
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,15,40,"Status LED ");
if (now()%2==0)
{
ReefAngel.LED.On();
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,80,40,"On ");
}
else
{
ReefAngel.LED.Off();
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,80,40,"Off");
}
ReefAngel.Relay.RelayData=1<<port;
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.PWM.SetActinic(now()%100);
ReefAngel.PWM.SetDaylight(now()%100);
ReefAngel.LCD.DrawMonitor(15, 70, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor(15, 70, ReefAngel.Params);
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawOutletBox(12, 103, ReefAngel.Relay.RelayData);
ReefAngel.LCD.DrawDate(6, 122);
ReefAngel.Relay.Write();
ReefAngel.Refresh();
}
ports 3 and 8 turned off when i unplugged the wifi port 1 still is not coming on even though its reading on. Are those ports suppose to turn off when i unplug the wifi if so i need to switch the setup because thats my return pump and wave maker ports
Re: Problem with ports
Posted: Tue Oct 30, 2012 6:31 pm
by rimai
Did you go through every port using the joystick and tested the socket?
Re: Problem with ports
Posted: Tue Oct 30, 2012 7:40 pm
by lartho6
ok found the problem its the communication cable that one port would turn on and off as i moved the controller which was when the cable was moved.. i guess i need to order a new one.. that may be my problem.... ok finally got everything number the way it should.. thanks guys..