Hello Guest it is March 29, 2024, 11:40:46 AM

Author Topic: Cutting a Circle - Figures don't add up!  (Read 2645 times)

0 Members and 1 Guest are viewing this topic.

Offline JG

*
  •  61 61
    • View Profile
Cutting a Circle - Figures don't add up!
« on: July 22, 2020, 11:42:32 AM »
Trying to get my head around G2 arc cutting, but the simulation shows that the circle diameter is not as designed.
Using an 8mm dia cutter - and therefore allowing a 4mm adjustment to the radius - the simulation shows that rather than cutting a 96.75mm dia pocket it will cut a 185.5mm dia ??? ?  whose radius is 92.75 --  so it's not even cutting 'double size'.

This is the code :
Code: [Select]
%
O0000  (Bore large shallow hole.NC)

N10 (Author - JG  - 22 July 2020)
N20 (for Denford MicroRouter Compact under Mach3 V2)
N30 (Thread Milling Ø100 x 3mm    -   bore = 96.75 - R= 48.375)
N40 ()
N45 (T3 D=8  Flat end-mill)
N50 (units mm)
N60 (X & Y 0 in MACHINE centre)
        (X min = -200, X max +200)
        (Y min = -100, Y Max = +100)
        (Z 0 at top)

N100 G17 G21 G00                   (set up XY Plane & Metric - fast traverse)
N110 X44.375 Y0 Z-50              (move XY & Z  Determine Z by reference to work)
N120 S8000 M3                         (set spindle speed & start spindle)
N130 F100 Z-52                        (set feed rate & plunge into work 2mm)
N140 F200 G2 I-44.375 J0        (set feed rate, cut Circle about 0,0)
(N150 F100 Z-54)                     (set feed rate & plunge into work 2mm)
(N160 F200 G2 I-44.375 J0)     (set feed rate, cut Circle about 0,0)

N1450 M05                               (Turn spindle off)

N1500 G00 X0 Y0 Z0                (move tool at fast rate to 0 0 0)
N1510 M30                              (Close Program)
%
I've included all comments/annotations rather than just the working lines in case there is something that I simply have wrong in the basic understanding.

Lines N150 and N160 are commented out because, with them in, Mach3 complained that "R or IJK are all missing from N150" - which I also don't understand - I would expect to take the first cut then reduce the feed for a further 'plunge' and then do a second cut (where I & J would be specified).  Ultimately there would be more cuts depending upon how deep I want the hole to be.

In the light of the Mach3 error message, can anyone suggest how the Z parameter can be specified in the same block as G2 and therefore create a helical cut getting deeper with each 'turn' and if such is possible how would the final depth the specified.

In case anyone thinks that the feeds and speeds are in error I should say that this would be cutting a hardwood such as Ash, Elm, Teak, Walnut  --  etc.

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: Cutting a Circle - Figures don't add up!
« Reply #1 on: July 22, 2020, 01:44:19 PM »
A simple circle with the machine zero on the centre line of the circle and on the top face would be something like this :-

%
G21 G40 G00 G99 G17

N1 (8MM DIA END MILL)
G54 G00 G90 G43 X0 Y0 Z5. H3 S8000 M3
Z1.
G01 Z-52. F100.
X44.375 F200.
G02 I-44.375
G01 Z-54.
G02 I-44.375
G00 X0 Y0
Z5.
M30
%

For helical :-

%
G21 G40 G00 G99 G17

N1 (8MM DIA END MILL)
G54 G00 G90 G43 X0 Y0 Z5. H3 S8000 M3
Z1.
G01 Z-52. F100.
X44.375 F200.
G02 I-44.375 Z-54.
I-44.375 Z-56.
G00 X0 Y0
Z5.
M30
%
Without engineers the world stops

Offline JG

*
  •  61 61
    • View Profile
Re: Cutting a Circle - Figures don't add up!
« Reply #2 on: July 22, 2020, 02:53:00 PM »
Thanks for the input Graham but your code produces exactly the same result as mine does   (I'm ignoring the helical for now).

To run it of course I had to modify the Z figures since my system has a Z max of 0 so Z5 and Z1 are both 'soft limit' errors.

Running a simulation and watching the X & Y DROs I see that the max X gets to 44.375 (as you would expect but the Min X goes to -133.125. Similarly the Max and Min Y go to + & - 88.75. From those figures I determine that with an 8mm cutter the diameter of the circle produced would be either 88.75+88.7+8  or  133.125+44.375+8  - both of which amount to 185.5   not the 88.75 ( 96.75-8 ) that I would expect from using a 44.375 offset.

To further check that I'm not ready for the asylum  :)     I've done a 'real life' test using my [Pencil] tool and produced a real plot - including marking the X0 Y0 position - see attached photo - you'll see that the ruler indicates about 177.5 dia and the line is just over 1 mm  wide  (that's due to the marginally off-centre sharpening of the pencil)  which further confuses the issue as it seems to be 8mm smaller than the simulation plot indicates   ???

Incidentally - I now know why I got the 'R or IJK missing' error - the way I'd added that line meant that G2 was still in operation and I should have issued a G1  :-[    but at least I've learned that today !!

In case you'd like to check that I haven't applied any pertinent changes to what you provided, here is the latest program which produced the plot :

Code: [Select]
%
G21 G40 G00 G99 G17

N1 (Pencil)
G54 G00 G90 G43 X0 Y0 Z0 T3 S3000 M3

G01 X44.375 F500.
Z-34
G02 I-44.375
G01 Z-34.5
G02 I-44.375
G00 X0 Y0
Z0.
M30
%
The second pass using Z-34.5 just presses the pencil down a little harder.

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: Cutting a Circle - Figures don't add up!
« Reply #3 on: July 22, 2020, 05:23:56 PM »
You do not have the datum set right.

Move your pencil to a clear space.

Jog down until the pencil touches the paper.

Click Zero X to the left of the X DRO on the program screen.

Click Zero Y

Click Zero Z

Jog clear  in Z

Load and run this code

%
G21 G40 G00 G99 G17

N1 (8MM DIA END MILL)
G54 G00 G90 X0 Y0 Z5. S3000 M3
Z1.
G01 Z0 F100.
X50. F500.
G02 I-50.
G00 X0 Y0 Z5.
M30
%

You should get a 100mm circle give or take the line width of the pencil.

If not something is wrong in your settings

« Last Edit: July 22, 2020, 05:43:01 PM by Graham Waterworth »
Without engineers the world stops

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Cutting a Circle - Figures don't add up!
« Reply #4 on: July 23, 2020, 03:20:15 AM »
i assume in Config -> General config  the I/J Mode is set to absolute.

so your starting coordinate in X is 44,375

by using

G2 I-44,375

you are telling the System, that the Center X coordinate of your circle is absulute -44,375

so your start is at +44,375 and the Center is at -44,375 makes a radius of 88,75 and a
diamater of 177,5. exactly what your ruler Shows.

about the Min/Max:

Max X := X-Start = 44,375
Min X:= X-Start - Diameter = 44.775 - 177,5 = -133,125

Y is nowhere specified, so it takes the startvalue = 0

Max Y := 0 + Radius  = +88,75
Min Y := 0 - Radius = -88,75

so the entire Problem is the Absolute I/J Mode insteed of incremental.

with incremental Mode we will have the following situation

so your starting coordinate in X is 44,375

by using

G2 I-44,375

you are telling the System, that the Center X coordinate of your circle is incremental -44,375 witch
makes the Center going to absolute X = 0

so your start is at +44,375 and the Center is at 0 makes a radius of 44,375 and a
diamater of 88,75.

about the Min/Max:

Max X := 44,375
Min X:= -44.375

Y is nowhere specified, so it takes the startvalue = 0

Max Y := 0 + Radius  = +44,375
Min Y := 0 - Radius = -44,375







   
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline JG

*
  •  61 61
    • View Profile
Re: Cutting a Circle - Figures don't add up!
« Reply #5 on: July 23, 2020, 03:59:34 AM »
Thanks Graham & TPS  -  you have both helped immensely!

I've only run the codes on my 'simulation' system as yet but my next job is to go to the workshop system and test for 'real'. (I'll sharpen the pencil!)

Graham - your solution did work but I had to click [ Yes ] when asked to over-ride the soft limits.

TPS  -  you hit the nail firmly on the head!   -   I had assumed that IJK were incremental since I had seen that as the default so hadn't checked, but yes, it was set to absolute and once that was corrected the table display immediately changed.  ;D      I didn't really need to run the code (but I did) and of course the figures fell into line.

This probably also solves the seemingly erratic behaviour I'm seeing in another test of plotting a rectangle with 3 differently curved corners.      I'll let you know.

« Last Edit: July 23, 2020, 04:02:06 AM by JG »

Offline JG

*
  •  61 61
    • View Profile
Re: Cutting a Circle - Figures DO add up!
« Reply #6 on: July 23, 2020, 05:28:24 AM »
Success all round - see photo attached showing 88.75mm dia circle about the centre of my machine table.

I knew it had to be something simple but there are so many potential 'adjustments' available in Mach3 that without pointers from experienced users it can become a mysterious 'fog' and I am very grateful for the advice received.

Now to cut some wood !     

Oh....   before I do,  Graham,  in your code for a helical cut, can the feed in the Z axis be specified ?    ie. can it be controlled separately from the X Y feed so that a 'thread' could be specified using the pitch as the Z distance per revolution?

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Cutting a Circle - Figures don't add up!
« Reply #7 on: July 23, 2020, 05:42:21 AM »
this code from Graham:
Code: [Select]
%
G21 G40 G00 G99 G17

N1 (8MM DIA END MILL)
G54 G00 G90 G43 X0 Y0 Z5. H3 S8000 M3
Z1.
G01 Z-52. F100.
X44.375 F200.
G02 I-44.375 Z-54.
I-44.375 Z-56.
G00 X0 Y0
Z5.
M30
%

will start at Z -52
1st circle cut will bring Z to -54
2nd circle cut will bring Z to -56

so the pitch will be 2mm, it is not depending on Speed, it is depending on hight differenc (Z).
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline JG

*
  •  61 61
    • View Profile
Re: Cutting a Circle - Figures don't add up!
« Reply #8 on: July 23, 2020, 05:56:45 AM »
That is fantastic news TPS  -  and tells me exactly what I wanted to know - without me causing a disaster by running a cutter into wood.

I can see now that by changing the radius I can control the amount of 'cut' applied when milling a thread and by specifying the Z distance I'm specifying the 'pitch'.   I was obviously over-thinking the whole issue by not having very specific details about what parameters needed to be passed using G33, G34 or G76.


It is now going to be worthwhile making the thread-milling cutter I've already designed.  :)

Offline JG

*
  •  61 61
    • View Profile
Re: Cutting a Circle - Figures don't add up!
« Reply #9 on: July 24, 2020, 01:17:39 PM »
Progressing a little further, I'm now wanting to cut a circular 'pocket' - well the outside - and I'd like it to be 22mm deep.
The top of the work is at Z= -52 so starting a Z= -51 to provide a 'Z lead-in' so that there is no plunge entry, I'm using G2 with the Z parameter changing at each pass by 2mm I want to get down to Z = -74 but, in the simulation, I'm getting a [Soft Limits] error when Z is below -71  ???   

This is the program I'm simulating :
Code: [Select]
%
O0010  (Bore ready to Thread Mill 80 x 3.NC)

N10 (Author - JG  - 24 July 2020)
N20 (for Denford MicroRouter Compact under Mach3 V2)
N30 (Thread Milling 80 x 3mm    -   bore = 76.75 - R= 38.376)
N40 (T3 D=8 Flatt End Mill to remove centre)
N45 (T4 D=24.32 Thread Mill cutter)
N50 (units mm)
N60 (X & Y 0 in MACHINE centre)
        (X Min = -200, X Max +200)
        (Y Min = -100, Y Max = +100)
        (Z Max = 0 at top    Z Min = -100)

N100 G17 G21 G00          (set up XY Plane & Metric - fast traverse)
N110 X34.0762 Y0 Z-51    (move XY & Z     -    Determine Z by reference to work)
N120 S8000 M3                 (set spindle speed & start spindle)
N130 F3000                        (set feed rate  -  simulation )
N140 G2 I-34.0762 J0 Z-52    (cut Circle about 0,0 feeding Z 2mm)
N150 I-34.0762 J0 Z-54
N160 I-34.0762 J0 Z-56
N170 I-34.0762 J0 Z-58
N180 I-34.0762 J0 Z-60
N190 I-34.0762 J0 Z-62
N200 I-34.0762 J0 Z-64
N210 I-34.0762 J0 Z-66
N220 I-34.0762 J0 Z-68
N230 I-34.0762 J0 Z-70
N240 I-34.0762 J0 Z-71
N250 I-34.0762 J0
(N260 I-34.0762 J0)        (Cut flat bottom    NO Z change)

N1450 M05           (Turn spindle off)

N1500 G00 X0 Y0 Z0  (move tool at fast rate to 0 0 0)
N1510 M30           (Close Program)
%

The error appears if I set Z in N240 to -72   --   I would expect (in theory) to be able to go to -100, there will of course be other factors such as tool length that will preclude that, but I'm not setting a tool Nº which might confuse the issue anywhere.

A separate question  -  after each rotation (line of G-Code  N140 - N240) there is a tool 'dwell'; can this be eliminated so that the program simply runs a continuous cycle ?