Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: Jubei on April 20, 2010, 08:10:27 PM
-
Hi All!
This is my first post after tons of (rtfm) :) At any rate, I've got everything up and running, however, I seem to have a problem with how my X axis code is being interpreted. I suspect that for a Gantry style router, the code is correct in that the spindle moves in the direction to the right for increases in X values. In a mill style, this is obviously not the case.
As the table is moves to the left, my values for X should be increasing but it doesn't.
Is there a way to fix this that I might have missed?
Thanks for the help!
-
You can reverse the axis direction by changing the X direction pin "active low" state
-
Changing the active state as elpablito has said will do this but some drives are picky about that setting so best to do it via the reverse option in Homing and Limits page.
Hood
-
I understand. Homing is working properly. It homes in the direction of the home switches.
For instance, my gcode says X32.0. Instead of the spindle moving to the right as in a gantry (which would be correct), the mill table moves to the right which on a vertical mill would really be X-32.0. I will try switching the x direction "active low" pin.
-
The Reverse option on the Homing and Limits page is for changing axis direction and is the one you should use.
As said above changing the active state of the Dir pin may upset your drives. You should look up your drive literature to see what state they should be for Step/Dir.
Hood
-
The Reverse option on the Homing and Limits page is for changing axis direction and is the one you should use.
As said above changing the active state of the Dir pin may upset your drives. You should look up your drive literature to see what state they should be for Step/Dir.
Hood
Thanks so much Hood!
I will do this instead. I guess I misunderstood what you were initially saying.
-
I tried the reverse option and it does reverse the direction, but does so for the homing switches as well. Right now, it homes in the bottom left corner when facing the machine. So the reverse causes it to home on the opposite side and misses the home switch altogether.
Doesn't really fix the issue per se. Would it be easier, or should I say do most people use a negative X movement for vertical mills?
-
Maybe you can combine what Hood suggested with the "Home Negative" checkbox to invert your homing direction
-
Thanks elpablito! Right now I am testing. I am doing a run with the x code converted to -x. that seems to be working so far. Adjusting the homing messes up the homing directions.
-
Yes, change the Home Negative setting to suit :)
Hood
-
The method should be:
1) Set the pin active low setting according to driver requirements in the pin setup
2) Adjust the axis direction using the reversed checkbox in the homing setup.
3) Now that the axis move in the right direction, deppending on where you have the home switches, set the home negative checkbox for each axis
Now you should have the axis direction properly configured
Regards
-
Both of you are patient! It works now with the x-axis in reverse and then the neg direction unchecked. That seems to fix it without messing with the gcodes.
Thanks for the help guys, I appreciate it!