Reversing axis direction in linuxcnc
Please can someone tell me the best way to reverse the direction of an axis in Linuxcnc?
I just realized that I accidentally built a dyslexic machine when my engraved letters came out backwards on the X axis...
I read something about making it negative in Hal but I can't see which line needs to be changed.
Re: Reversing axis direction in linuxcnc
Did you use stepconf or pncconfig to set it up? If so then check the box to reverse the axis. If you did a manual install then change the sign of the output_scale in the .ini file.
Ed.
Re: Reversing axis direction in linuxcnc
Quote:
Originally Posted by
atex57
Did you use stepconf or pncconfig to set it up? If so then check the box to reverse the axis. If you did a manual install then change the sign of the output_scale in the .ini file.
Ed.
I initial set it up using stepconf but I was hoping to change it without going through the whole set-up again.
When you say change the sign of the output scale, do you mean making the limit a negative number?
E.g. Is my X axis home is 0 and limit is 800mm, would I change the limit to -800mm?
Re: Reversing axis direction in linuxcnc
My mistake, you are looking for input_scale=xxxx in your ini file. Change the xxxx to -xxxx, xxxx being your step count. I have never used stepconf but pncconf lets you page through if you select modify an existing setup. Play around with it, you can always cancel any changes at the end.
Ed.
Re: Reversing axis direction in linuxcnc
...reverse the wiring to axis motor/tach? or possible plan B what type axis drive are you using...it may have an Invert jumper/parameter setting on the PCB
Re: Reversing axis direction in linuxcnc
Quote:
Originally Posted by
machinehop5
...reverse the wiring to axis motor/tach? or possible plan B what type axis drive are you using...it may have an Invert jumper/parameter setting on the PCB
I'm using stepper motors via a Geck G540. There are no axis direction switches on the hardware (at least not that I can see on the outside).
Is there an advantage to reversing the wires on the motors instead of adding a "-" in the INI?
Re: Reversing axis direction in linuxcnc
As mentioned , go to the ini file in configs and change the " scale " from either positive or negative .
Re: Reversing axis direction in linuxcnc
Quote:
Originally Posted by
Goemon
Is there an advantage to reversing the wires on the motors instead of adding a "-" in the INI?
...depends on why the machine axis/joint is running backwards from normal. The next time you or someone changes CNC controller do not have to remember "Oh, I forgot that one of the axis is backwards"
my two cents,
DJ
Re: Reversing axis direction in linuxcnc
Quote:
Originally Posted by
machinehop5
...depends on why the machine axis/joint is running backwards from normal. The next time you or someone changes CNC controller do not have to remember "Oh, I forgot that one of the axis is backwards"
my two cents,
DJ
Yeah. Normally depends on wether you fit the motor on the left or right of the X table.
If I remermber correctly you can swap the wires from A+A- to B+B- and the B+B- to A+A- and that will switch the motor direction.
It's easier in Mach.
You can go into soft limits page and just check the 'reversed' box and job done.
I've also (accidentally) changed axis from 'active low' to 'active high' once, and the direction changed.
Re: Reversing axis direction in linuxcnc
I finally got around to correcting my axis direction. As an FYI to anyone else looking to do this, it's in the HAL file, not the INI.
Re: Reversing axis direction in linuxcnc
Quote:
Originally Posted by
Goemon
I finally got around to correcting my axis direction. As an FYI to anyone else looking to do this, it's in the HAL file, not the INI.
That does not really sound right but the ini file values are used in hal.
In your ini file, for a particular joint I have
Code:
STEP_SCALE = 261.130715645
If I wanted to reverse direction, I would use
Code:
STEP_SCALE = -261.130715645
This value is steps per device unit (mm for me, you may be using inches). In Mach I think they call it Steps Per