Unexpected Light turning off
Posted: Tue Oct 30, 2012 5:49 am
Hi
I need some help regard lighting schedule programimg. I am trying to control light schedule and intensity at diff timing of the day. But the light was turn off by it self (At diff timing for continus 2 day after upload the code) . I cannot turn back on through menu from head unit. to recover, need to power off then on again to resume schedule. Now I donot know it is programing issues or the relay box problem. (I just chage head unit due to joystick problem).
I had attached code below.
Please help
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.SetTemperatureUnit( Celsius ); // set to Celsius Temperature
ReefAngel.AddStandardMenu(); // Add Standard Menu
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port3Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port3Bit | Port5Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port2Bit;
// 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( 300 );
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port6 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port2,5,55,22,10 );
ReefAngel.Relay.DelayedOn( Port3,60 );
ReefAngel.StandardLights( Port4,22,0,7,0 );
ReefAngel.StandardFan( Port5,270,280 );
ReefAngel.StandardLights( Port7,6,0,22,0 );
ReefAngel.StandardATO( Port8,60 );
//ReefAngel.PWM.SetDaylight( PWMSlope(8,0,22,0,15,90,60,15) );
//ReefAngel.PWM.SetActinic( PWMSlope(8,0,22,0,15,90,60,15) );
////// Place your custom code below here
//if (hour()==8) ReefAngel.PWM.SetDaylight(20);
//if (hour()==9) ReefAngel.PWM.SetDaylight(40);
//if (hour()==6) ReefAngel.PWM.SetDaylight(0);
//if (hour()==6) ReefAngel.PWM.SetActinic(15);
if (hour()==10) ReefAngel.PWM.SetDaylight(15);
if (hour()==10) ReefAngel.PWM.SetActinic(50);
if (hour()==11) ReefAngel.PWM.SetDaylight(50);
if (hour()==11) ReefAngel.PWM.SetActinic(75);
if (hour()==12) ReefAngel.PWM.SetDaylight(90);
if (hour()==12) ReefAngel.PWM.SetActinic(90);
if (hour()==16) ReefAngel.PWM.SetDaylight(50);
if (hour()==16) ReefAngel.PWM.SetActinic(75);
if (hour()==17) ReefAngel.PWM.SetDaylight(25);
if (hour()==17) ReefAngel.PWM.SetActinic(25);
if (hour()==20) ReefAngel.PWM.SetDaylight(15);
if (hour()==20) ReefAngel.PWM.SetActinic(25);
if (hour()==21) ReefAngel.PWM.SetDaylight(0);
if (hour()==21) ReefAngel.PWM.SetActinic(25);
if (hour()==22) ReefAngel.PWM.SetDaylight(0);
if (hour()==22) ReefAngel.PWM.SetActinic(0);
////// Place your custom code above here
// This should always be the last line
ReefAngel.ShowInterface();
}
I need some help regard lighting schedule programimg. I am trying to control light schedule and intensity at diff timing of the day. But the light was turn off by it self (At diff timing for continus 2 day after upload the code) . I cannot turn back on through menu from head unit. to recover, need to power off then on again to resume schedule. Now I donot know it is programing issues or the relay box problem. (I just chage head unit due to joystick problem).
I had attached code below.
Please help
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.SetTemperatureUnit( Celsius ); // set to Celsius Temperature
ReefAngel.AddStandardMenu(); // Add Standard Menu
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port3Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port3Bit | Port5Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port2Bit;
// 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( 300 );
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port6 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardLights( Port2,5,55,22,10 );
ReefAngel.Relay.DelayedOn( Port3,60 );
ReefAngel.StandardLights( Port4,22,0,7,0 );
ReefAngel.StandardFan( Port5,270,280 );
ReefAngel.StandardLights( Port7,6,0,22,0 );
ReefAngel.StandardATO( Port8,60 );
//ReefAngel.PWM.SetDaylight( PWMSlope(8,0,22,0,15,90,60,15) );
//ReefAngel.PWM.SetActinic( PWMSlope(8,0,22,0,15,90,60,15) );
////// Place your custom code below here
//if (hour()==8) ReefAngel.PWM.SetDaylight(20);
//if (hour()==9) ReefAngel.PWM.SetDaylight(40);
//if (hour()==6) ReefAngel.PWM.SetDaylight(0);
//if (hour()==6) ReefAngel.PWM.SetActinic(15);
if (hour()==10) ReefAngel.PWM.SetDaylight(15);
if (hour()==10) ReefAngel.PWM.SetActinic(50);
if (hour()==11) ReefAngel.PWM.SetDaylight(50);
if (hour()==11) ReefAngel.PWM.SetActinic(75);
if (hour()==12) ReefAngel.PWM.SetDaylight(90);
if (hour()==12) ReefAngel.PWM.SetActinic(90);
if (hour()==16) ReefAngel.PWM.SetDaylight(50);
if (hour()==16) ReefAngel.PWM.SetActinic(75);
if (hour()==17) ReefAngel.PWM.SetDaylight(25);
if (hour()==17) ReefAngel.PWM.SetActinic(25);
if (hour()==20) ReefAngel.PWM.SetDaylight(15);
if (hour()==20) ReefAngel.PWM.SetActinic(25);
if (hour()==21) ReefAngel.PWM.SetDaylight(0);
if (hour()==21) ReefAngel.PWM.SetActinic(25);
if (hour()==22) ReefAngel.PWM.SetDaylight(0);
if (hour()==22) ReefAngel.PWM.SetActinic(0);
////// Place your custom code above here
// This should always be the last line
ReefAngel.ShowInterface();
}