I am building a battery charging box for my son's RC batteries. I have a 1000W 24V Meanwell power supply to supply input voltage to a pair of DC chargers. Sometimes we don't have access to AC but do have access to 24V DC. I would like to add a port to his box so that I can take the 24V DC input and use it in place of the power supply. I thought about putting a relay in and triggering it off the AC power supply so that if the AC power supply was on it would switch from the DC input to the power supply. Is there a simpler way? Ideally, I would like the option to use the DC input as a DC output for someone else's DC charger if I was on AC power. But this is not a requirement.