Read online about the m42 command supported by Marlin . It will switch any spare pin on the ramps board. I’m not sure if a 5anp relay will be enough for a router but there are larger current relays available so I’m sure you’ll figure it out. Once you decide on the i/o pin to use then you’ll just have to put the m42 code in your post processor to automatically add it to your gcode files.
Reply To: Corndogs 30 by 30 built