Relay as in what type (transistor,Triac, Electro/mechanical)
Where's supply voltage comming from to power switch.
Do you need a buffer interface to stop feedback to M/board. Could possibly use opto isolator.
Best way to software control is to write a prog in assembler code and run it from within a Dos window.
Good luck, lots of work required.