Strange results when I rotated a part.
28 Aug 2011 13:35 - 28 Aug 2011 13:37 #12789
by lancewert
Strange results when I rotated a part. was created by lancewert
I have a part that I make on my CNC router. To nest it into the piece of material I have t o rotate it 180 degrees. The issue I am having is that the 180 degree rotated part comes out approx. .02" larger on the perimeter. All holes that are interpolated come out in the correct position and size.
I was doing all G2 G3 interpolations with an R value instead of I,J. I don't see how this could hurt anything.
I started to think that it has something to do with Cutter Compensation somehow... but I have a G40 at the start of the program.
The machine is homebuilt by me. I have used it for awhile now with zero problems. It's a pretty basic 3-axis gantry style router with the Hobby CNC control board and some Nema 23 steppers.
Anyway here is the code for each part;
non-rotated
G20
G90
G17
G40
G0 X0.0 Y0.0 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X0.035
G3 X-0.035 R0.035
G3 X0.035 R0.035
G1 Z0.2
G0 Z0.5
G0 X.585 Y-.48 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X0.6201
G3 X0.55 R0.035
G3 X0.6201 R0.035
G1 Z0.2
G0 Z0.5
G0 X2.3 Y-.19 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X2.3351
G3 X2.265 R0.035
G3 X2.3351 R0.035
G1 Z0.2
G0 Z0.5
G0 X2.3 Y2.09 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X2.3351
G3 X2.265 R0.035
G3 X2.3351 R0.035
G1 Z0.2
G0 Z0.5
G0 X.585 Y2.38 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X0.6201
G3 X0.55 R0.035
G3 X0.6201 R0.035
G1 Z0.2
G0 Z0.5
G0 X0.0 Y1.9 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X0.035
G3 X-0.035 R0.035
G3 X0.035 R0.035
G1 Z0.2
G0 Z0.5
G0 X.5038 Y0.8875 Z0.5
G0 Z0.2
G1 Z0.0 F7.0
G2 X.4413 Y.95 R0.0625
G1 Y1.7527
G2 X.4670 Y1.7835 R.0312
G2 X2.3 Y1.8712 R7.2095
G3 X2.5127 Y2.0389 R.2188
G3 X2.3690 Y2.2976 R.2188
G3 X.5814 Y2.5837 R4.8581
G3 X-.3392 Y1.9474 R1.0414
G3 X-.3613 Y1.8382 R.2812
G1 Y.0618
G3 X-.3392 Y-.0474 R.2812
G3 X.5814 Y-.6837 R1.0414
G3 X2.369 Y-.3976 R4.8581
G3 X2.5127 Y-.1389 R.2188
G3 X2.3 Y.0288 R.2188
G2 X.4670 Y.1165 R7.2095
G2 X.4413 Y.1473 R0.0312
G1 Y.95
G2 X.5038 Y1.0125 R.0625
G1 Z0.2
G0 Z0.5
G0 X0.0 Y0.0
M30
rotated;
G20
G90
G17
G40
G0 X0.0 Y0.0 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X-0.035
G3 X0.035 R0.035
G3 X-0.035 R0.035
G1 Z0.2
G0 Z0.5
G0 X-.585 Y-.48 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X-0.6201
G3 X-0.55 R0.035
G3 X-0.6201 R0.035
G1 Z0.2
G0 Z0.5
G0 X-2.3 Y-.19 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X-2.3351
G3 X-2.265 R0.035
G3 X-2.3351 R0.035
G1 Z0.2
G0 Z0.5
G0 X-2.3 Y2.09 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X-2.3351
G3 X-2.265 R0.035
G3 X-2.3351 R0.035
G1 Z0.2
G0 Z0.5
G0 X-.585 Y2.38 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X-0.6201
G3 X-0.55 R0.035
G3 X-0.6201 R0.035
G1 Z0.2
G0 Z0.5
G0 X-0.0 Y1.9 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X-0.035
G3 X0.035 R0.035
G3 X-0.035 R0.035
G1 Z0.2
G0 Z0.5
G0 X-.5038 Y0.8875 Z0.5
G0 Z0.2
G1 Z0.0 F7.0
G3 X-.4413 Y.95 R0.0625
G1 Y1.7527
G3 X-.4670 Y1.7835 R.0312
G3 X-2.3 Y1.8712 R7.2095
G2 X-2.5127 Y2.0389 R.2188
G2 X-2.3690 Y2.2976 R.2188
G2 X-.5814 Y2.5837 R4.8581
G2 X.3392 Y1.9474 R1.0414
G2 X.3613 Y1.8382 R.2812
G1 Y.0618
G2 X.3392 Y-.0474 R.2812
G2 X-.5814 Y-.6837 R1.0414
G2 X-2.369 Y-.3976 R4.8581
G2 X-2.5127 Y-.1389 R.2188
G2 X-2.3 Y.0288 R.2188
G3 X-.4670 Y.1165 R7.2095
G3 X-.4413 Y.1473 R0.0312
G1 Y.95
G3 X-.5038 Y1.0125 R.0625
G1 Z0.2
G0 Z0.5
G0 X0.0 Y0.0
M30
Thanks for the help!
I was doing all G2 G3 interpolations with an R value instead of I,J. I don't see how this could hurt anything.
I started to think that it has something to do with Cutter Compensation somehow... but I have a G40 at the start of the program.
The machine is homebuilt by me. I have used it for awhile now with zero problems. It's a pretty basic 3-axis gantry style router with the Hobby CNC control board and some Nema 23 steppers.
Anyway here is the code for each part;
non-rotated
G20
G90
G17
G40
G0 X0.0 Y0.0 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X0.035
G3 X-0.035 R0.035
G3 X0.035 R0.035
G1 Z0.2
G0 Z0.5
G0 X.585 Y-.48 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X0.6201
G3 X0.55 R0.035
G3 X0.6201 R0.035
G1 Z0.2
G0 Z0.5
G0 X2.3 Y-.19 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X2.3351
G3 X2.265 R0.035
G3 X2.3351 R0.035
G1 Z0.2
G0 Z0.5
G0 X2.3 Y2.09 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X2.3351
G3 X2.265 R0.035
G3 X2.3351 R0.035
G1 Z0.2
G0 Z0.5
G0 X.585 Y2.38 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X0.6201
G3 X0.55 R0.035
G3 X0.6201 R0.035
G1 Z0.2
G0 Z0.5
G0 X0.0 Y1.9 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X0.035
G3 X-0.035 R0.035
G3 X0.035 R0.035
G1 Z0.2
G0 Z0.5
G0 X.5038 Y0.8875 Z0.5
G0 Z0.2
G1 Z0.0 F7.0
G2 X.4413 Y.95 R0.0625
G1 Y1.7527
G2 X.4670 Y1.7835 R.0312
G2 X2.3 Y1.8712 R7.2095
G3 X2.5127 Y2.0389 R.2188
G3 X2.3690 Y2.2976 R.2188
G3 X.5814 Y2.5837 R4.8581
G3 X-.3392 Y1.9474 R1.0414
G3 X-.3613 Y1.8382 R.2812
G1 Y.0618
G3 X-.3392 Y-.0474 R.2812
G3 X.5814 Y-.6837 R1.0414
G3 X2.369 Y-.3976 R4.8581
G3 X2.5127 Y-.1389 R.2188
G3 X2.3 Y.0288 R.2188
G2 X.4670 Y.1165 R7.2095
G2 X.4413 Y.1473 R0.0312
G1 Y.95
G2 X.5038 Y1.0125 R.0625
G1 Z0.2
G0 Z0.5
G0 X0.0 Y0.0
M30
rotated;
G20
G90
G17
G40
G0 X0.0 Y0.0 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X-0.035
G3 X0.035 R0.035
G3 X-0.035 R0.035
G1 Z0.2
G0 Z0.5
G0 X-.585 Y-.48 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X-0.6201
G3 X-0.55 R0.035
G3 X-0.6201 R0.035
G1 Z0.2
G0 Z0.5
G0 X-2.3 Y-.19 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X-2.3351
G3 X-2.265 R0.035
G3 X-2.3351 R0.035
G1 Z0.2
G0 Z0.5
G0 X-2.3 Y2.09 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X-2.3351
G3 X-2.265 R0.035
G3 X-2.3351 R0.035
G1 Z0.2
G0 Z0.5
G0 X-.585 Y2.38 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X-0.6201
G3 X-0.55 R0.035
G3 X-0.6201 R0.035
G1 Z0.2
G0 Z0.5
G0 X-0.0 Y1.9 Z0.5
G0 Z0.2
G1 Z0.0 F2.0
G1 X-0.035
G3 X0.035 R0.035
G3 X-0.035 R0.035
G1 Z0.2
G0 Z0.5
G0 X-.5038 Y0.8875 Z0.5
G0 Z0.2
G1 Z0.0 F7.0
G3 X-.4413 Y.95 R0.0625
G1 Y1.7527
G3 X-.4670 Y1.7835 R.0312
G3 X-2.3 Y1.8712 R7.2095
G2 X-2.5127 Y2.0389 R.2188
G2 X-2.3690 Y2.2976 R.2188
G2 X-.5814 Y2.5837 R4.8581
G2 X.3392 Y1.9474 R1.0414
G2 X.3613 Y1.8382 R.2812
G1 Y.0618
G2 X.3392 Y-.0474 R.2812
G2 X-.5814 Y-.6837 R1.0414
G2 X-2.369 Y-.3976 R4.8581
G2 X-2.5127 Y-.1389 R.2188
G2 X-2.3 Y.0288 R.2188
G3 X-.4670 Y.1165 R7.2095
G3 X-.4413 Y.1473 R0.0312
G1 Y.95
G3 X-.5038 Y1.0125 R.0625
G1 Z0.2
G0 Z0.5
G0 X0.0 Y0.0
M30
Thanks for the help!
Last edit: 28 Aug 2011 13:37 by lancewert. Reason: clarification
Please Log in or Create an account to join the conversation.
28 Aug 2011 13:56 #12791
by BigJohnT
Replied by BigJohnT on topic Re:Strange results when I rotated a part.
I'm not at a Linux machine to check out your code but did you know you can use G10 L2 Pn Rn to rotate the coordinate system about the Z axis?
www.linuxcnc.org/docview/html/gcode_main...:G10:-Set-Coordinate
John
www.linuxcnc.org/docview/html/gcode_main...:G10:-Set-Coordinate
John
Please Log in or Create an account to join the conversation.
29 Aug 2011 19:39 #12830
by andypugh
Replied by andypugh on topic Re:Strange results when I rotated a part.
I was going to say the same thing as John, G10 rotation might be easier.
How did you rotate the part? was it manually or with a CAM package?
How did you rotate the part? was it manually or with a CAM package?
Please Log in or Create an account to join the conversation.
29 Aug 2011 21:50 #12835
by lancewert
Replied by lancewert on topic Re:Strange results when I rotated a part.
I rotate the part manually in "mousepad". I will have to give the G10 code a shot. I hope that works...
Thanks again!
Thanks again!
Please Log in or Create an account to join the conversation.
Time to create page: 0.065 seconds