Tested in 2.6.11 and master-ish with configs/sim/axis:
1. Start AXIS. Power on. Home all. Clear G54, G92 offsets via menu
2. MDI: G54
3. MDI: G0 G53 X0 Y0
4. MDI: G92 X1 / G10 L2 P1 R45 / G0 G53 X0 Y0
Expected behavior: no motion at step 4, because the machine was already at G53 X0 Y0 after step 3
Actual behavior: motion to machine coordinates (.2929, -.7071)
评论 (5)
#2 – rgbond 于 2021-10-09
I have a fix for the interpreter. The G53 code in find_ends() doesn’t handle G92 offsets correctly. It should do the rotation before applying the G92 offset.
Here’s the change, sorry about the formatting, must be better ways to do this.
`- double cx = s->current_x;’
‘- double cy = s->current_y;’
‘+ double cx = s->currentx + s->axisoffset_x;’
‘+ double cy = s->currenty + s->axisoffset_y;’
‘ rotate(&cx, &cy, s->rotation_xy);’
”
‘ if(block->x_flag) {‘
‘- *px = block->xnumber – s->originoffsetx – s->axisoffsetx – s->tooloffset.tran.x;’
‘+ *px = block->xnumber – s->originoffsetx – s->tooloffset.tran.x;’
‘ } else {‘
‘ *px = cx;’
‘ }’
‘ ‘
” if(block->y_flag) {”
‘- *py = block->ynumber – s->originoffsety – s->axisoffsety – s->tooloffset.tran.y;’
‘+ *py = block->ynumber – s->originoffsety – s->tooloffset.tran.y;’
‘ } else {‘
‘ *py = cy;’
‘ }’
”
‘ rotate(px, py, -s->rotation_xy);’
‘+ *px -= s->axisoffsetx;’
‘+ *py -= s->axisoffsety;’
#3 – jepler 于 2021-10-10
Thanks! The best way to get a change accepted into linuxcnc is by preparing a pull request. Patches added to issues are likely to get lost.
#4 – rgbond 于 2021-10-10
I’m working on a pull request for this and a few other rotation issues. Still checking and testing at the moment.
#5 – andypugh 于 2022-04-05
Seems to be fixed by #1297
#1 – jepler 于 2016-01-22
Instead of G0 G53 X0 Y0, you can also G91 G0 X0 Y0, which shouldn’t cause motion since it’s in incremental distance mode with all distances zero. It takes you to the same machine location as the G0 G53 version.
!rotation-g92-wrongmotion