I am upgrading my old 3 axis Mach3/C10 based controller to an ESS with a C25 BOB and Mach4. All the outputs, including the motors and spindle relay run perfectly. But I am having trouble with the home switches. They appear to be latching in Mach4 and not clearing when the switch is released.

Can someone please tell me the best way to wire the home switches to the C25 BOB? I currently have them connected to Port 2, pins 2, 3 and 4. Should I be connecting the other side of the switch to GND or to 5V? Do I need a pull up/down resistor? Should I have them configured as active on high or low?

Thanks very much in advance.