question about offset
17 Apr 2019 04:30 #131034
by sm
question about offset was created by sm
Hello All,
I am trying to figure out the best way to set offset in nc file/the entire machine.
I've been trying dynamic cutter compensation, but somehow, dynamic cutter compensation made not very precise cut. Probably I did something wrong... I don't know...
but in my case cutter's diameter stays the same, so, perhaps I could use global offset?
I am running the below file and trying to figure out why it cuts smaller then expected piece. Am I doing something terribly wrong?
according to what I see on the screen of linuxcnc (and my expectations are the same), it should cut square 10X10 mm. but it come out smaller.
I have 5211 set to -0.36 and 5212 - -0.36 set in linuxcnc.var (which should set global offset for X and Y respectively) (diameter of the tool is 0.72 mm) and because cutting goes counterclockwise I have set offsets like above - negative values.
I ran stepconf and as I measured both axises move to expected distance, so, as I understand both axises travel correctly and should make correct distance while working this file.
so, I am puzzled what it could be to cause the machine to cut product smaller than specified in nc file.
Any suggestions, please?
Or perhaps I did not understand how it all works? Then, please someone explain it to me.
I am reading docs for linuxcnc and I am not sure I understand the entire process as examples are not fully describe all the steps.
and plus, as it seems to me there are several ways to define offset in linuxcnc.
so, if I have stable cutting tool diameter, my understanding I can set global offset by either issuing:
G92.1 (cancel global offset)
G92 X<+/-value> Y<+/-value>
do I need to use G54 after that in nc file?
do i need to use G10 L1 P1 x0 y0 after that in nc file? if - yes, then I suppose, I need to have correct tbl file with offsets and tool diameter set in it. correct?
OR
I see in the documentation that I can define global offset by issuing G54 X<val> Y<val>
All I am trying to accomplish is:
I have the same tool diameter and number of gcode files for parts I need to cut. nc files are generated by program I have written. program generates nc file based on file produced by Rhinoceros 3D modeling program.
My program uses some kind of header file, which has set of gcode commands. those commands are always present at the top of nc file so, they are always add first to nc file. then my program reads coordinates points from rhino file and assembles gcode lines with specific code (like for example: straight line will be prepended with G1 and added X<va> Y<val>).
So, being knowing that tool diameter will be always the same, I am trying to find a way so, I could just place material in the machine load the file and cut exactly the piece as specified in nc file and offset for cutting tool would be applied automatically.
Could anyone please suggest the best way to accomplish it, please!
Thank you in advance!
N0 ;(square1.ngc)
N1 G21 (use millimeters)
N2 ;G92.1 (cancel global offset and zeroes all values)
N3 G90 (absolute distance mode)
N4 ;G40 (cancel cutter compensation)
N5 G54 (select coordinate system. must be set before G42/G42)
N6 G61 (Exact path mode)
N7 G17 (Plane Select. XY = default )
N8 F30.2 (set cutting speed)
N9 ;G10 L1 P1 R0.36 (set tool table)
N10 ;T1 M6 (load tool. M6 - manual tool change)
N11 ;G42 (start compensation right - G41 starts compensation left)
N12 G1 X1.40 Y1.00
N13 G1 X10.60 Y1.00
N14 G1 X11.00 Y1.40
N15 G1 X11.00 Y10.60
N16 G1 X10.60 Y11.00
N17 G1 X1.40 Y11.00
N18 G1 X1.00 Y10.60
N19 G1 X1.00 Y1.40
N20 G1 X1.40 Y1.00
N21 ;G40
N22 M2
I am trying to figure out the best way to set offset in nc file/the entire machine.
I've been trying dynamic cutter compensation, but somehow, dynamic cutter compensation made not very precise cut. Probably I did something wrong... I don't know...
but in my case cutter's diameter stays the same, so, perhaps I could use global offset?
I am running the below file and trying to figure out why it cuts smaller then expected piece. Am I doing something terribly wrong?
according to what I see on the screen of linuxcnc (and my expectations are the same), it should cut square 10X10 mm. but it come out smaller.
I have 5211 set to -0.36 and 5212 - -0.36 set in linuxcnc.var (which should set global offset for X and Y respectively) (diameter of the tool is 0.72 mm) and because cutting goes counterclockwise I have set offsets like above - negative values.
I ran stepconf and as I measured both axises move to expected distance, so, as I understand both axises travel correctly and should make correct distance while working this file.
so, I am puzzled what it could be to cause the machine to cut product smaller than specified in nc file.
Any suggestions, please?
Or perhaps I did not understand how it all works? Then, please someone explain it to me.
I am reading docs for linuxcnc and I am not sure I understand the entire process as examples are not fully describe all the steps.
and plus, as it seems to me there are several ways to define offset in linuxcnc.
so, if I have stable cutting tool diameter, my understanding I can set global offset by either issuing:
G92.1 (cancel global offset)
G92 X<+/-value> Y<+/-value>
do I need to use G54 after that in nc file?
do i need to use G10 L1 P1 x0 y0 after that in nc file? if - yes, then I suppose, I need to have correct tbl file with offsets and tool diameter set in it. correct?
OR
I see in the documentation that I can define global offset by issuing G54 X<val> Y<val>
All I am trying to accomplish is:
I have the same tool diameter and number of gcode files for parts I need to cut. nc files are generated by program I have written. program generates nc file based on file produced by Rhinoceros 3D modeling program.
My program uses some kind of header file, which has set of gcode commands. those commands are always present at the top of nc file so, they are always add first to nc file. then my program reads coordinates points from rhino file and assembles gcode lines with specific code (like for example: straight line will be prepended with G1 and added X<va> Y<val>).
So, being knowing that tool diameter will be always the same, I am trying to find a way so, I could just place material in the machine load the file and cut exactly the piece as specified in nc file and offset for cutting tool would be applied automatically.
Could anyone please suggest the best way to accomplish it, please!
Thank you in advance!
N0 ;(square1.ngc)
N1 G21 (use millimeters)
N2 ;G92.1 (cancel global offset and zeroes all values)
N3 G90 (absolute distance mode)
N4 ;G40 (cancel cutter compensation)
N5 G54 (select coordinate system. must be set before G42/G42)
N6 G61 (Exact path mode)
N7 G17 (Plane Select. XY = default )
N8 F30.2 (set cutting speed)
N9 ;G10 L1 P1 R0.36 (set tool table)
N10 ;T1 M6 (load tool. M6 - manual tool change)
N11 ;G42 (start compensation right - G41 starts compensation left)
N12 G1 X1.40 Y1.00
N13 G1 X10.60 Y1.00
N14 G1 X11.00 Y1.40
N15 G1 X11.00 Y10.60
N16 G1 X10.60 Y11.00
N17 G1 X1.40 Y11.00
N18 G1 X1.00 Y10.60
N19 G1 X1.00 Y1.40
N20 G1 X1.40 Y1.00
N21 ;G40
N22 M2
Please Log in or Create an account to join the conversation.
17 Apr 2019 15:24 #131054
by pl7i92
Replied by pl7i92 on topic question about offset
you may have a look in this video
to get a climp on how this can be done in gcode
to get a climp on how this can be done in gcode
The following user(s) said Thank You: sm
Please Log in or Create an account to join the conversation.
18 Apr 2019 19:11 - 18 Apr 2019 19:46 #131175
by sm
Replied by sm on topic question about offset
thank you for replying pl7i92.
what I don't understand is why the piece is coming out cut smaller.
I tried to run gcode, where I am NOT using any compensation, so, my understanding is that I supposed to get a piece cut, which will be smaller two diameters of cutting tool. the tool diameter is 0.72 mm. I am cutting a square 10x10mm. so, 10 - 0.72=9.28. now, two other sides will be also shorter for the same amount. so, 9.28-0.72=8.56
so, according to my above calculations, I supposed to get a square 8.56x8.56. but I am getting it smaller.
I see in linuxcnc.var 5241=-0.44 and 5242=-0.44. I've been trying to set them to 0 manually, but they are stubbornly coming back. if those offsets are applied, my square should be 8.12x8.12.
but I am getting 4.4x4.4mm square.
liuxcnc gui is telling me that it traveled all the way 10mm, when in reality it did not even make a half of it.
I am adding files, so, anyone could please take a look and suggest how to fix this/explain to me what I am doing wrong.
Thank you very much in advance!
here is my nc file:
N0 ;(square1.ngc)
N1 G92.1(reset G92 and set values to zero)
N2 G17 (Plane Select. XY = default )
N3 G21 (use millimeters)
N4 G54 (select coordinate system. must be set before G42/G42)
N5 G90 (absolute distance mode)
N6 G40 (cancel cutter compensation)
N7 G61 (Exact path mode)
N8 F0.10 (set feed)
N9 ;G53 G0
N10 ;G54 X0.36 Y0.36
N11 G1 X1.40 Y1.00
N12 G1 X10.60 Y1.00
N13 G1 X11.00 Y1.40
N14 G1 X11.00 Y10.60
N15 G1 X10.60 Y11.00
N16 G1 X1.40 Y11.00
N17 G1 X1.00 Y10.60
N18 G1 X1.00 Y1.40
N19 G1 X1.40 Y1.00
N20 G40
N21 M2
#########
and here is my linuxcnc.var
5161 0.000000
5162 0.000000
5163 0.000000
5164 0.000000
5165 0.000000
5166 0.000000
5167 0.000000
5168 0.000000
5169 0.000000
5181 0.000000
5182 0.000000
5183 0.000000
5184 0.000000
5185 0.000000
5186 0.000000
5187 0.000000
5188 0.000000
5189 0.000000
5210 0.000000
5211 0.000000
5212 0.000000
5213 0.000000
5214 0.000000
5215 0.000000
5216 0.000000
5217 0.000000
5218 0.000000
5219 0.000000
5220 1.000000
5221 0.000000
5222 0.000000
5223 0.000000
5224 0.000000
5225 0.000000
5226 0.000000
5227 0.000000
5228 0.000000
5229 0.000000
5230 0.000000
5241 -0.440000
5242 -0.440000
5243 0.000000
5244 0.000000
5245 0.000000
5246 0.000000
5247 0.000000
5248 0.000000
5249 0.000000
5250 0.000000
5261 0.000000
5262 0.000000
5263 0.000000
5264 0.000000
5265 0.000000
5266 0.000000
5267 0.000000
5268 0.000000
5269 0.000000
5270 0.000000
5281 0.000000
5282 0.000000
5283 0.000000
5284 0.000000
5285 0.000000
5286 0.000000
5287 0.000000
5288 0.000000
5289 0.000000
5290 0.000000
5301 0.000000
5302 0.000000
5303 0.000000
5304 0.000000
5305 0.000000
5306 0.000000
5307 0.000000
5308 0.000000
5309 0.000000
5310 0.000000
5321 0.000000
5322 0.000000
5323 0.000000
5324 0.000000
5325 0.000000
5326 0.000000
5327 0.000000
5328 0.000000
5329 0.000000
5330 0.000000
5341 0.000000
5342 0.000000
5343 0.000000
5344 0.000000
5345 0.000000
5346 0.000000
5347 0.000000
5348 0.000000
5349 0.000000
5350 0.000000
5361 0.000000
5362 0.000000
5363 0.000000
5364 0.000000
5365 0.000000
5366 0.000000
5367 0.000000
5368 0.000000
5369 0.000000
5370 0.000000
5381 0.000000
5382 0.000000
5383 0.000000
5384 0.000000
5385 0.000000
5386 0.000000
5387 0.000000
5388 0.000000
5389 0.000000
5390 0.000000
###############
what I don't understand is why the piece is coming out cut smaller.
I tried to run gcode, where I am NOT using any compensation, so, my understanding is that I supposed to get a piece cut, which will be smaller two diameters of cutting tool. the tool diameter is 0.72 mm. I am cutting a square 10x10mm. so, 10 - 0.72=9.28. now, two other sides will be also shorter for the same amount. so, 9.28-0.72=8.56
so, according to my above calculations, I supposed to get a square 8.56x8.56. but I am getting it smaller.
I see in linuxcnc.var 5241=-0.44 and 5242=-0.44. I've been trying to set them to 0 manually, but they are stubbornly coming back. if those offsets are applied, my square should be 8.12x8.12.
but I am getting 4.4x4.4mm square.
liuxcnc gui is telling me that it traveled all the way 10mm, when in reality it did not even make a half of it.
I am adding files, so, anyone could please take a look and suggest how to fix this/explain to me what I am doing wrong.
Thank you very much in advance!
here is my nc file:
N0 ;(square1.ngc)
N1 G92.1(reset G92 and set values to zero)
N2 G17 (Plane Select. XY = default )
N3 G21 (use millimeters)
N4 G54 (select coordinate system. must be set before G42/G42)
N5 G90 (absolute distance mode)
N6 G40 (cancel cutter compensation)
N7 G61 (Exact path mode)
N8 F0.10 (set feed)
N9 ;G53 G0
N10 ;G54 X0.36 Y0.36
N11 G1 X1.40 Y1.00
N12 G1 X10.60 Y1.00
N13 G1 X11.00 Y1.40
N14 G1 X11.00 Y10.60
N15 G1 X10.60 Y11.00
N16 G1 X1.40 Y11.00
N17 G1 X1.00 Y10.60
N18 G1 X1.00 Y1.40
N19 G1 X1.40 Y1.00
N20 G40
N21 M2
#########
and here is my linuxcnc.var
5161 0.000000
5162 0.000000
5163 0.000000
5164 0.000000
5165 0.000000
5166 0.000000
5167 0.000000
5168 0.000000
5169 0.000000
5181 0.000000
5182 0.000000
5183 0.000000
5184 0.000000
5185 0.000000
5186 0.000000
5187 0.000000
5188 0.000000
5189 0.000000
5210 0.000000
5211 0.000000
5212 0.000000
5213 0.000000
5214 0.000000
5215 0.000000
5216 0.000000
5217 0.000000
5218 0.000000
5219 0.000000
5220 1.000000
5221 0.000000
5222 0.000000
5223 0.000000
5224 0.000000
5225 0.000000
5226 0.000000
5227 0.000000
5228 0.000000
5229 0.000000
5230 0.000000
5241 -0.440000
5242 -0.440000
5243 0.000000
5244 0.000000
5245 0.000000
5246 0.000000
5247 0.000000
5248 0.000000
5249 0.000000
5250 0.000000
5261 0.000000
5262 0.000000
5263 0.000000
5264 0.000000
5265 0.000000
5266 0.000000
5267 0.000000
5268 0.000000
5269 0.000000
5270 0.000000
5281 0.000000
5282 0.000000
5283 0.000000
5284 0.000000
5285 0.000000
5286 0.000000
5287 0.000000
5288 0.000000
5289 0.000000
5290 0.000000
5301 0.000000
5302 0.000000
5303 0.000000
5304 0.000000
5305 0.000000
5306 0.000000
5307 0.000000
5308 0.000000
5309 0.000000
5310 0.000000
5321 0.000000
5322 0.000000
5323 0.000000
5324 0.000000
5325 0.000000
5326 0.000000
5327 0.000000
5328 0.000000
5329 0.000000
5330 0.000000
5341 0.000000
5342 0.000000
5343 0.000000
5344 0.000000
5345 0.000000
5346 0.000000
5347 0.000000
5348 0.000000
5349 0.000000
5350 0.000000
5361 0.000000
5362 0.000000
5363 0.000000
5364 0.000000
5365 0.000000
5366 0.000000
5367 0.000000
5368 0.000000
5369 0.000000
5370 0.000000
5381 0.000000
5382 0.000000
5383 0.000000
5384 0.000000
5385 0.000000
5386 0.000000
5387 0.000000
5388 0.000000
5389 0.000000
5390 0.000000
###############
Last edit: 18 Apr 2019 19:46 by sm. Reason: addition
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1409
18 Apr 2019 20:11 #131180
by Todd Zuercher
Replied by Todd Zuercher on topic question about offset
if you ran the g-code above (all the tool offset lines are commented out) with a 0.72mm tool you should get a square 9.28mm (10mm minus the radius of the tool on each side)
Parameter #5241-5250 are the machine coordinate offsets for G55 they will have no bearing on your above g-code. and even if you did run the code in the G55 coordinates it would not effect the size of the square, they will only effect it's position.
Parameter #5410 is the tool diameter
When you normally command a move of 10mm does the machine move 10mm?
If it does not are you sure you don't have a machine configuration/scaling issue?
Parameter #5241-5250 are the machine coordinate offsets for G55 they will have no bearing on your above g-code. and even if you did run the code in the G55 coordinates it would not effect the size of the square, they will only effect it's position.
Parameter #5410 is the tool diameter
When you normally command a move of 10mm does the machine move 10mm?
If it does not are you sure you don't have a machine configuration/scaling issue?
Please Log in or Create an account to join the conversation.
18 Apr 2019 20:25 #131181
by sm
Replied by sm on topic question about offset
Hi Todd,
thank you. yes, while running stepconf, I have tested both drives - they move 10mm it was asked in test step.
so, something is scaling and I cannot figure out what it is. the file above finishes and comes to the end. so, from linuxcnc perspective it did everything it asked for. in the gui it says it will move 10mm, but in reality I am getting squre 4.44x4.45. so, something is dividing every move and I am cracking my brain to find out what it could be...
thank you. yes, while running stepconf, I have tested both drives - they move 10mm it was asked in test step.
so, something is scaling and I cannot figure out what it is. the file above finishes and comes to the end. so, from linuxcnc perspective it did everything it asked for. in the gui it says it will move 10mm, but in reality I am getting squre 4.44x4.45. so, something is dividing every move and I am cracking my brain to find out what it could be...
![:( :(](/media/kunena/emoticons/sad.png)
Please Log in or Create an account to join the conversation.
18 Apr 2019 20:42 #131184
by sm
Replied by sm on topic question about offset
G55, huh? Todd, do you know how do I reset those 5241 and 5242?
I tried just manually set them to 0. bounced linuxcnc. They are coming back! I don't have G55 anywhere in my code. why the hell those are coming back?
I put in my gcode G92.1, thinking it would take care of all these global offsets. G55 is setting coordinate system parameter. so, as I understand it it is pretty much the same - global offset. am I correct?
Thank you!
I tried just manually set them to 0. bounced linuxcnc. They are coming back! I don't have G55 anywhere in my code. why the hell those are coming back?
I put in my gcode G92.1, thinking it would take care of all these global offsets. G55 is setting coordinate system parameter. so, as I understand it it is pretty much the same - global offset. am I correct?
Thank you!
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1409
18 Apr 2019 21:04 - 18 Apr 2019 21:06 #131189
by Todd Zuercher
Replied by Todd Zuercher on topic question about offset
There are a number of ways, You can use the touch off buttons in the GUI, Or you can use some MDI commandsor use a
But this will not effect your square coming out the wrong size. (unless you are cutting off the edge of your piece and are using the G55 coordinates)
#5241=0
#5242=0
G10L20P2X0Y0
But this will not effect your square coming out the wrong size. (unless you are cutting off the edge of your piece and are using the G55 coordinates)
Last edit: 18 Apr 2019 21:06 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1409
18 Apr 2019 21:12 #131191
by Todd Zuercher
Replied by Todd Zuercher on topic question about offset
Also just because it moved the right distance in Stepconfig, I would not assume that it does or will while running Linuxcnc. Check it to be sure. (I don't think I've ever successfully used the motor testing screens in either of the config wizards.)
Please Log in or Create an account to join the conversation.
18 Apr 2019 21:12 #131192
by sm
Replied by sm on topic question about offset
Thank you Todd.
so,
#5241=0
#5242=0
are those entered with # sign in MDI?
G10 L20 P2 X0 Y0 - did you mean G10 L2 P0
or you meant to say G10 L20 P2?
Thank you!
so,
#5241=0
#5242=0
are those entered with # sign in MDI?
G10 L20 P2 X0 Y0 - did you mean G10 L2 P0
or you meant to say G10 L20 P2?
Thank you!
Please Log in or Create an account to join the conversation.
18 Apr 2019 21:16 #131193
by sm
Replied by sm on topic question about offset
seriously? oh, boy... I thought this is what those are for - to test your drives and verify they are moving as expected...
and like I said - I just finished testing piece and this gcode completed the square, but it come out scaled. so, it is my understanding that linuxcnc calculates moves correctly, but scales them.
and I am trying to find out where the hell this scaling is being set. and how to get rid of it.
and like I said - I just finished testing piece and this gcode completed the square, but it come out scaled. so, it is my understanding that linuxcnc calculates moves correctly, but scales them.
and I am trying to find out where the hell this scaling is being set. and how to get rid of it.
Please Log in or Create an account to join the conversation.
Time to create page: 0.114 seconds