No diagram but easy enough, for example a relay with a 24v coil would be used for Inputs to Mach, the coil would be powered via a limit switch and when broken the contacts would open (NO contacts on relay) and the contacts side would be connected to the BOB just like you would any other input.
For outputs it would be the opposite, the coil would be 5v and the contacts would have the 24v.
Hood