XY Plotter/CNC style interpolation project. Need great deal of help

maybe your switches are HIGH when open and LOW when closed(pressed)