I'm designing a 3 axis stepper controller to be used on a gantry router
and controlled by Mach3 . It has full manual control with jog buttons for
each axis , and an array of PLD inputs wich are wired to each stepper driver and to the DB25 . I can virtually program any logic function between any input and output . The idea is to make it all fit an eurocard size pcb , wich is ideal for pcb drills and small routers .
Now , I've got inputs for two limit switches on each axis , and if needed an extra optical home switch .
The limit switches are combined into the pld , and will halt stepper motion on their axis , and only for the concerned direction . Example X+ limit switch activated will block further motion in X+ direction , but will not affect X- direction or the other 2 axis .
So far so good .
But what I don't know is : what do I tell mach3 , and how do I do that .
5 inputs are available on the db25 .
One for the e-stop
One for the z-axis optical home switch .
wich leaves only 3 .
I could wire all six switches into an or function , and mach 3 will know when a limit is reached . But then I can't use them as homing switches . Because teher's no way to tell wich axis has reached the home position first .
I could also wire them into two combined and functions , then the homing will work , but then mach 3 won't know if a single limit is reached .
The extra home on the Z-axis is a highly precise optical device , wich I would like to use to determine tool height relative to the T-slot table after a tool bit has been changed .
Tool bit change would require the machine to move to a predefined position , X+ and Y+ limit , raise the tool to maximum height ( Z- limit ) and then wait .
After the tool change , the z-axis should move very slowly , without the spindle activated , until it presses the optical Z home .
Does that sound OK ? I have no experainace with mach or any other cnc software .
Thx for any advice .
Pat