Hello Guest it is July 19, 2024, 11:56:43 AM

Author Topic: 2 home directions, switch driver off in code, home axis individually  (Read 1651 times)

0 Members and 1 Guest are viewing this topic.

Starting to set up home and limits on my machine, basically a 2d plotter that uses paint instead of a pen, and I have 3 questions:-

1) I need 2 of its axes to home in both directions. X axis needs a 'rough home' switch at the far end of its travel, and a 'fine home' switch close to the other end. Z axis (which is not like a milling machine's Z axis; all this one does is work like a syringe driver to push paint) needs to use both of its limit switches as home switches. I have to specify a direction for each axis to home in; but in both cases I need it to home in the opposite direction as well, something which I believe Mach doesn't allow for.

I could use a G01 command to drive either axis until the limit switch opposite the home switch is tripped, but I then need to assign a value to that axis using G92 and then continue on to the next line of code; which tripping a switch configured as a limit won't do.

As a workaround, I had considered wiring the 2 limit switches up to Input #1 (I don't use a guard) and Input #2, and using these signals to open a macro that says either 'Set X DRO to my value, and go back to main program'  or 'Set Z DRO to my value, and go back to main program' as appropriate. I have 2 parallel ports, so using another 2 input lines in addition to my ganged limit switches on port1, pin11 is no problem.

Is this a reliable way to do this? Or is there a way of doing this just in the main gcode file?

2) I'd like to be able to switch off one of my Motion Control MSD 415 drivers during a large part of the execution of my code, I'm not sure if this is possible; if so, would it involve wiring the 5V supply to the driver via a Mach output pin, and switching it off (and later back on again) from a macro? If so, potentially simple to do. If its position changes during the off period, it's not a problem.

3) I have home switches configured for 4 axes, and I want them all to home individually, is this possible? If so, could someone show me an example of how this is coded?

Thanks anyone...
« Last Edit: January 24, 2015, 03:02:35 PM by moorea21 »