gnea / grbl

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino
https://github.com/gnea/grbl/wiki
Other
4.04k stars 1.61k forks source link

Y Axis moves in wrong direction in absolute mode (G90) #1193

Closed johankladder closed 1 year ago

johankladder commented 1 year ago

So i've installed GRBL 1.1 on a CNC Shield V3 and on first sight everything looks fine. I am able to home all my axis and stuff but I'm facing some problems when moving in absolute mode (G90).

The thing is when I initialise, my zero's are setted up in the left bottom corner of the machine (after homing) and I'm able to execute the command i.e. X50 Y100 which moves a bit to the right and up (this is correct). After this command I would like to move the machine to point X5 Y200. I expect the machine to move to left and up a bit, but instead of that it moves left and down.

The thing is, when I execute the command X50 Y100 and then a simple Y200 command, everything works fine.

Also when I plug in the Y stepper cable into the Z slot and replace the sequence with X50 Z100 and X5 Z200 everything works as expected also...

I don't understand what I do wrong. Is there someone who can explain if I do something wrong?

My GRBL settings:

$0 = 10    (Step pulse time, microseconds)
$1 = 25    (Step idle delay, milliseconds)
$2 = 0    (Step pulse invert, mask)
$3 = 0    (Step direction invert, mask)
$4 = 0    (Invert step enable pin, boolean)
$5 = 0    (Invert limit pins, boolean)
$6 = 0    (Invert probe pin, boolean)
$10 = 1    (Status report options, mask)
$11 = 0.010    (Junction deviation, millimeters)
$12 = 0.002    (Arc tolerance, millimeters)
$13 = 0    (Report in inches, boolean)
$20 = 0    (Soft limits enable, boolean)
$21 = 1    (Hard limits enable, boolean)
$22 = 1    (Homing cycle enable, boolean)
$23 = 7    (Homing direction invert, mask)
$24 = 500.000    (Homing locate feed rate, mm/min)
$25 = 2500.000    (Homing search seek rate, mm/min)
$26 = 250    (Homing switch debounce delay, milliseconds)
$27 = 10.000    (Homing switch pull-off distance, millimeters)
$30 = 1000    (Maximum spindle speed, RPM)
$31 = 0    (Minimum spindle speed, RPM)
$32 = 0    (Laser-mode enable, boolean)
$100 = 40.000    (X-axis travel resolution, step/mm)
$101 = 40.000    (Y-axis travel resolution, step/mm)
$102 = 40.000    (Z-axis travel resolution, step/mm)
$110 = 20000.000    (X-axis maximum rate, mm/min)
$111 = 20000.000    (Y-axis maximum rate, mm/min)
$112 = 20000.000    (Z-axis maximum rate, mm/min)
$120 = 400.000    (X-axis acceleration, mm/sec^2)
$121 = 400.000    (Y-axis acceleration, mm/sec^2)
$122 = 400.000    (Z-axis acceleration, mm/sec^2)
$130 = 1000.000    (X-axis maximum travel, millimeters)
$131 = 1000.000    (Y-axis maximum travel, millimeters)
$132 = 1000.000    (Z-axis maximum travel, millimeters)
johankladder commented 1 year ago

Update:

It was because of a Arduino Clone. That chip had a short on the direction pins. Changed to a 'real' one and everything worked as expected.