G28 and G30 don't do xy rotation
17 Sep 2021 04:23 #220856
by rgb
G28 and G30 don't do xy rotation was created by rgb
At least it looks that way from poking though the code in Interp::convert_savehome() The code appears to remove the g5x, g93 and tool offsets but doesn't do usual xy rotation... Is that a bug?
Thanks,
Bob Bond
Thanks,
Bob Bond
Please Log in or Create an account to join the conversation.
17 Sep 2021 13:39 #220891
by Aciera
Replied by Aciera on topic G28 and G30 don't do xy rotation
What do you mean by 'doesn't do usual xy rotation'?
Are you expecting G28 and G30 to unrotate a rotation set previously by 'G10 L2 P- <axes R->'?
Are you expecting G28 and G30 to unrotate a rotation set previously by 'G10 L2 P- <axes R->'?
Please Log in or Create an account to join the conversation.
17 Sep 2021 14:22 #220900
by rgb
Replied by rgb on topic G28 and G30 don't do xy rotation
Yes, that's it. The docs say absolute coordinates are saved. I was assuming that you can't get back to absolute coordinates without undoing a possible "R" rotation on x, y.
Please Log in or Create an account to join the conversation.
17 Sep 2021 16:15 #220921
by Aciera
Replied by Aciera on topic G28 and G30 don't do xy rotation
Yes, I see your point. I don't have an answer and I've never used it. So maybe wait if somebody else has an explanation.
Please Log in or Create an account to join the conversation.
20 Sep 2021 16:48 - 20 Sep 2021 17:19 #221208
by rgb
Replied by rgb on topic G28 and G30 don't do xy rotation
Here's a simple test case:
%
g20
g10 p1 l2 x0 y0 z0
g10 p2 l2 x0 y0 z0 r45
g55
g0 x1 y1
g28.1
g54
(g0)
g0 z1
(g28)
g28
%executing
And the rs274 output:
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
4 N..... SET_XY_ROTATION(0.0000)
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
6 N..... ON_RESET()
7 N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES)
8 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
9 N..... SET_XY_ROTATION(0.0000)
10 N..... COMMENT("interpreter: setting coordinate system origin")
11 N..... SET_G5X_OFFSET(2, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
12 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
13 N..... SET_XY_ROTATION(45.0000)
14 N..... STRAIGHT_TRAVERSE(1.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000)
15 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
16 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
17 N..... SET_XY_ROTATION(0.0000)
18 N..... COMMENT("g0")
19 N..... STRAIGHT_TRAVERSE(0.0000, 1.4142, 1.0000, 0.0000, 0.0000, 0.0000)
20 N..... COMMENT("g28")
21 N..... STRAIGHT_TRAVERSE(0.0000, 1.4142, 1.0000, 0.0000, 0.0000, 0.0000)
22 N..... STRAIGHT_TRAVERSE(1.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000)
23 N..... FINISH()
24 N..... ON_RESET()
25 N..... ON_RESET()
It's clear that line 22 is wrong. If the z1 is moved to the g28 command it seems to be fine.
%
g20
g10 p1 l2 x0 y0 z0
g10 p2 l2 x0 y0 z0 r45
g55
g0 x1 y1
g28.1
g54
(g0)
g0 z1
(g28)
g28
%executing
And the rs274 output:
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
4 N..... SET_XY_ROTATION(0.0000)
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
6 N..... ON_RESET()
7 N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES)
8 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
9 N..... SET_XY_ROTATION(0.0000)
10 N..... COMMENT("interpreter: setting coordinate system origin")
11 N..... SET_G5X_OFFSET(2, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
12 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
13 N..... SET_XY_ROTATION(45.0000)
14 N..... STRAIGHT_TRAVERSE(1.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000)
15 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
16 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
17 N..... SET_XY_ROTATION(0.0000)
18 N..... COMMENT("g0")
19 N..... STRAIGHT_TRAVERSE(0.0000, 1.4142, 1.0000, 0.0000, 0.0000, 0.0000)
20 N..... COMMENT("g28")
21 N..... STRAIGHT_TRAVERSE(0.0000, 1.4142, 1.0000, 0.0000, 0.0000, 0.0000)
22 N..... STRAIGHT_TRAVERSE(1.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000)
23 N..... FINISH()
24 N..... ON_RESET()
25 N..... ON_RESET()
It's clear that line 22 is wrong. If the z1 is moved to the g28 command it seems to be fine.
Last edit: 20 Sep 2021 17:19 by rgb.
Please Log in or Create an account to join the conversation.
Time to create page: 0.134 seconds