Page 1 of 1

Incorrect G54-G59

PostPosted: Thu Oct 01, 2020 9:26 pm
by zerodivide
Apparently G54-G59 codes can not be in the same line as XYZ codes.

Now working Example:
G55 (Where Offsets are x-9999 y -9999)
G54 X0 Y0 (Machine still in G55 will try to move axis. This will fire the overtravel error)

But this works:
G55 (Where Offsets are x-9999 y -9999)
G54
X0 Y0 (this is fine)

Why this matters: most CAM software by default generate code like: G0 G90 G17 G54 X.. Y..

Which will fail or crash the machine if the current offset is different from the programmed one.

Re: Incorrect G54-G59

PostPosted: Fri Oct 02, 2020 6:29 am
by dezsoe
Yes, it is a known issue, the order of execution of the words in one line is wrong.

Re: Incorrect G54-G59

PostPosted: Fri Oct 02, 2020 12:04 pm
by zerodivide
Is it going to be looked at?
Because it also seem to affect this one:
G90 G0 Z1.0
G28 G91 Z0
- instead of sending Z axis home it moves all axis to zero.

I have edited a post processor, so it's not an issue any more but it did give me a scare when machine started to rapid into a corner. I can't be the only one it happens to.
Depending on where home is it could mean broken tools or crashed machine

Re: Incorrect G54-G59

PostPosted: Fri Oct 02, 2020 2:19 pm
by cncdrive
Yes, the G54, 55 etc to other g-code modals priority in a single line will be looked into and will be corrected.

The G28 G91 Z0 is errorous code by standard, so with this the issue is the g-code not how the UCCNC interprets it. The G91 should be before the G28 like G91 G28 Z0, but we will look into it, will compare how other softwares interpret it. But the issue is that the UCCNC interprets it as if G28 has no word parameters, because there are no words but another G-code after the G28 and the G28 without parameters homes all axes.

Re: Incorrect G54-G59

PostPosted: Fri Oct 02, 2020 7:16 pm
by zerodivide
Thank you!

If it helps you out, I tried to shuffle it like so: "G91 G28 Z0" (even though the spec says the order of codes in a block does not matter) and it did not change the behavior.

Again, thanks for looking into it.