The switches are connected to the computer and the outputs are from the computer that drive the valves. I did it this way so the computer can handle the tool change as well as operating manually. When the TC is in manual mode, the buttons are available for use, when the TC is in AUTO control is only by the computer. When in OFF, none of the TC, PDB works. There is a TC Manual subroutine running in thread 0 on the Galil controller. I use thread 0 running in a continuous scan for all of these types of functions, as well as E-stop and other error monitoring. The Auto TC sequence will run in it's own thread when called by Mach3.
The buttons/switches are
Tool In, BP
Tool Out, BP
Spindle Brake On/Off, 2 Pos, Sel Sw, Maintained
Auto/Off/Man, 3 Pos, Sel Sw, Maintained
Claw Open/Close, 3 Pos Sel Sw, Spring return, Center Off
Arm Tool/Spindle, 3 Pos Sel Sw, Spring return, Center Off
Turret CW/CCW, 3 Pos Sel Sw, Spring return, Center Off