Hello Guest it is July 12, 2020, 04:44:24 PM

Author Topic: tool diameter compensation  (Read 865 times)

0 Members and 1 Guest are viewing this topic.

tool diameter compensation
« on: July 26, 2017, 10:18:34 PM »
Hi,

I have a very simple question (I think!)...

I am trying to write a code to cut circles in different places by an end mill in helical movement. The code I write it by hand. I have used the same code in other machines and it works well but in Mathc3 the tool never comes back to the centre of the circle. I have tried by using the G91.1 instead of the G91 but does not work neither. I am leaving a simplified version of the code. In this case the circles should be of diameter 3mm and 0.5 mm depth.
In that code in N04 I would expect the tool first move to X0Y0.5 in linear movement (From X0Y0), then make a helix movement around the centre X0Y0 to the final point X0Y0.5 and finally move back to the X0Y0 position. What the code do is: the tool first move to a position ~X-0.3Y0.3, then it moves in an helix to around X0Y0 to the final point X0Y0.5, and finally it moves in a linear movement to X0Y-1

I hope someone can help me!

N01 G90G0X0YO
N02 G0Z1
N03 G1Z0.1F50
N04 M98P01L6
N05 G90G0Z10
N06 X10
N07 G0Z1
N08 G1Z0.1F50
N09 M98P01L6
N10 G90G0Z100
N11 M30
N12
N13 O01 (SUBRUTINE)
N14 G91G41P1G1Y1.5
N15 G3J-1.5Z-0.1
N16 G40G1Y-1.5
N17 M99

Thank you  very much in advance!

Offline reuelt

*
  •  440 440
    • View Profile
Re: tool diameter compensation
« Reply #1 on: July 26, 2017, 10:41:36 PM »
i would try to avoid using G91 (relative mode) in the subroutine IF the main routine is G90 (absolute mode).
IJ is usually always relative as set in default general config of MACH 3.
"the gift of God is eternal life through Jesus Christ our Lord"
Re: tool diameter compensation
« Reply #2 on: July 26, 2017, 10:46:26 PM »
Hi reuelt,

Thank you for your reply.

Actually I tried with the absolute mode (G90) and it works. The thing is, I want to make the holes in different positions, then using the absolute mode I would have to write the code for each hole.

Offline reuelt

*
  •  440 440
    • View Profile
Re: tool diameter compensation
« Reply #3 on: July 26, 2017, 11:20:41 PM »
Try using G92 X0 Y0 at the beginning of the subroutine to temporarily offset the coordinates (defining the current position as x0 y0)

Then add G92.1  (to cancel the offset) just before M99 in the subroutine.
Then you can work in G90 mode throughout, I think.
« Last Edit: July 26, 2017, 11:27:11 PM by reuelt »
"the gift of God is eternal life through Jesus Christ our Lord"
Re: tool diameter compensation
« Reply #4 on: July 27, 2017, 12:04:09 AM »
I tried with G92 but did not work.

I loaded a PDF file with the image of the screen shoot of the Mathc3 program.

Thank you anyway