gerritv / Grbl-Panel

A control panel for Grbl
MIT License
180 stars 102 forks source link

Direct input of coordinates gives strange results #130

Open aeleus opened 6 years ago

aeleus commented 6 years ago

Directly typing in X, Y, and Z coordinates does not work as expected for me. I hope it's just a lack of understanding on my part.

When my machine coordinates are at 0,0,0 Typing 1 into the X sends the command G10 L2 P1 X1 and results in X showing -1 Typing 3 into the X sends the command G10 L2 P1 X3 and results in X showing -3 Typing -1 into the X sends the command G10 L2 P1 X-1 and results in X showing 1

When my machine coordinates are at -1,-1,0 Typing 1 into the X sends the command G10 L2 P1 X1 and results in X showing -2 Typing 3 into the X sends the command G10 L2 P1 X3 and results in X showing -4 Typing -1 into the X sends the command G10 L2 P1 X-1 and results in X showing 0

If you plot the lines, you'll see that they are 90-deg off from expected and vary relative to machine coordinates.

If I use the manual command, but use G10 L20 P0 X[value], it works as expected regardless of what the machine coordinates are. e.g., G10 L20 P0 X1 gives me 1

This is the same command format Grbl-Panel uses when zeroing the axes. Is there a reason you use a different command for direct input?

I'm doing everything in inches.

GRBL 1.1f.20170801 V,15,128 Windows 10 1709

aeleus commented 6 years ago

More interesting behavior.

Typing '0' into the X, Y, or Z boxes simply sets them equal to whatever the machine coordinates are at the time. Any other number results in some offset - I suspect in mm.