Hi just like to add my modification to the above code with regard to the power on test I have amended it to allow for the number of relays assigned at the start so as you can add the relays and have them all test and not have to add extra lines at the end of the code

Code:
{
  Serial.println("PwrOnTest");
  for(int a=0; a < NUM_RELAYS; a++) //loop used to test relays
  {
    digitalWrite(Relay[a], LOW); //Turns the channel on
    delay(1000); //This is the amount of time the relay is on for.
    digitalWrite(Relay[a], HIGH);//Turns the channel off
  }
  Serial.println("Power On Test finished");
}
This is placed in the Void Post() area or what ever you would like to call that particular function.