Hi JSa1987
?
Your questions really relate to the DCC-EX side of the system, so they would be best dealt with on the DCC-EX Discord server, where the development team and experienced users answer questions like this.? They also have a specific area of their Discord Server devoted to questions about EX-RAIL.? This is a link to join their Discord server:
https://discord.gg/y2sB4Fp
?
Having said that, assuming you are using a relatively recent version of DCC-EX (v5.x), then it is possible to send Track Power commands via EX-RAIL, and I believe this could be achieved from a physical button or switch connected to an IO pin on the Mega.? Take a look at the DCC-EX Web Site in the EX-RAIL Command Reference section, specifically this link:
?
I also assume you are aware that the DCC-EX system can be setup to apply track power automatically when it is turned on.
?
Cheers,
Trevor