Hello Guest it is April 25, 2024, 12:53:15 AM

Author Topic: Polar Mode in Mach3 Mill  (Read 11427 times)

0 Members and 1 Guest are viewing this topic.

Polar Mode in Mach3 Mill
« on: February 13, 2008, 12:52:37 PM »
Comrades,
   Can someone please offer advice on using the polar mode commands G15, and G16? The manual (Rev 1.84-A2) states that G16 is used to enter polar mode and G15 is used to return to Cartesian coordinates. This is exactly opposite to the list in the Mach 3 program (the colorful list that gets brought up when the "g-code" button is pressed).

I tested the code in the manual (supplied below), using G16 G15 to start stop polar mode respectively, and G15 G16 to start stop respectively. I have selected the XY plane (G17) and am trying simply to get any polar move but seem to get only cartesian movement. A sample code known to work would be very helpful in working this bug.
Thanks in advance, 
Roger

From manual
G21
G0 X10Y5.5
G16
G1 X50 Y0
G83 Z-0.6
G1 Y20
G1 Y30
G1 Y40
> ...etc...
G15

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: Polar Mode in Mach3 Mill
« Reply #1 on: February 13, 2008, 01:42:11 PM »
Roger,

here is a PCD hole macro using polar code

Graham.

#1=8 (number of holes)
G21 G40 G00 G90
G00 Z10.
M98 P0002 L#1
G15
G90
M30

O0002
G16 X25. (radius)
G91
G81 Y[360/[#1]] Z-10. F100. (drill hole)
G15
G00 Z10.
M99
Without engineers the world stops
Re: Polar Mode in Mach3 Mill
« Reply #2 on: February 19, 2008, 11:19:05 AM »
Thank you for the reply. I tested the following program, based on the supplied code. The tool path window only generated linear motion, instead of a circular path with intervals of peck drilling. Is there a setting somewhere in Mach3 that needs to be changed to allow polar motion? Any more advice would be very welcome.

G21 G40 G00 G90
G00 Z10.
M98 P0002 L4
G15
G90
M30

O0002
G16 X25. (radius)
G91
G81 Y90 Z-10. F100. (drill hole)
G15
G00 Z10.
M99

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: Polar Mode in Mach3 Mill
« Reply #3 on: February 19, 2008, 12:10:25 PM »
OK, try it this way.

Graham.

%

#1=8 (number of holes)
#2=0
G21 G40 G00 G90
G00 Z10.
M98 P0002 L#1
G15
G90
M30

O0002
G16
X25. Y[[360/[#1]]*#2]
G15
G81 Z-10. R1. F100. (drill hole)
G80
#2=[#2+1]
G00 Z10.
M99

%
« Last Edit: February 19, 2008, 12:12:42 PM by Graham Waterworth »
Without engineers the world stops

vmax549

*
Re: Polar Mode in Mach3 Mill
« Reply #4 on: February 20, 2008, 02:45:54 PM »
Here is a straight example of the polar moves.

G0 z0.000
X0.000 Y0.000   (sets the pivot point)
G16
G81 x2.5 y0.0 R0.0 Z-.1 F3  ( in g16 mode the x becomes the offset from center and the Y becomes the degrees of rotation from the center of offset)
X2.5 Y90.0
X2.5 Y180.0
X2.5 Y270.0
G15             ( cancells the g16)
G80             ( cancells the canned cycle)
zo
X0y0
M30


THis will give you a four hole pattern based on a 2.5" offset(5"circle) and  starting at 3oclock

Just another example. (;-) TP
Re: Polar Mode in Mach3 Mill
« Reply #5 on: August 14, 2008, 07:47:51 PM »
Hi,

I just found the same thing, it seems like Mach3 doesn't like canned cycles when there is no X / Y specifed on the line

i.e.
G16
G1X?Y?
G81Z-1
doesn't work

but
G16
G81X?Y?Z-1
does work




Re: Polar Mode in Mach3 Mill
« Reply #6 on: July 29, 2009, 07:18:34 PM »
Has this inconsistency with the manual and the help file been addressed?

I am trying to drill holes every 15 degrees over 1/2 a circle knowing the radius, and the centre of the circle.  Copying the example straight from the manual does not work.  Have only found 4 or five posts that contain g15 or g16 and most of the example in those do not work.  Mostly just get linear motion with strange points.  No circularity at all.

Using demo version of .020 version current lockdown.

Jim H

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Polar Mode in Mach3 Mill
« Reply #7 on: July 29, 2009, 10:37:32 PM »
There is a circluar bolt hole wizard that should do what you want.
I know that is not hand programing. Never used it, may be  worth looking at the gcode it
generates.

RICH

vmax549

*
Re: Polar Mode in Mach3 Mill
« Reply #8 on: July 29, 2009, 10:54:56 PM »
HERE you go an example piece of code ( actually it is the same as 3 post up ^)

G0 z0.000
X0.000 Y0.000   (sets the pivot point)
G16
G81 x2.5 y0.0 R0.0 Z-.1 F3  ( in g16 mode the x becomes the offset from center and the Y becomes the degrees of rotation from the center of offset)
X2.5 Y90.0
X2.5 Y180.0
X2.5 Y270.0
G15             ( cancells the g16)
G80             ( cancells the canned cycle)
zo
X0y0
M30


THis will give you a four hole pattern based on a 2.5" offset(5"circle) and  starting at 3oclock

 (;-) TP
Re: Polar Mode in Mach3 Mill
« Reply #9 on: July 30, 2009, 07:21:26 AM »
Rich;

Yes I had thought of that as well.  However, the bolt hole wizard produces the same linear motion rather than a bolt pattern.  I had hoped to use the generated code to reverse engineer what works.  

Vmax;

Will test your sample.  Have cut and pasted the other samples in this thread and either I am expecting something different or they don't function in demo mode.

From the Mach manual I understand that one should be able to set a center point for rotation.  Then with a specified radius, be able to create points at any chosen angle of rotation, about that point.  The axis for the rotation of 0 degrees  is not defined or identified.  So one would have to test to see where the angle of 0 deg rotation is oriented.  One would expect that a degree could be + or - from a given axis or a defined starting line.

If this fails I will test the SIN, COS, and TAN functions of Mach to calculate where the points should be.  A simple subroutine passed the correct parameters should be able to calculate the endpoints.  Might need 4 subroutines for the 4 quadrants but if the math functions work it will be quicker than experimenting with broken code or manuals.  Much of the Mach G-Code and M-Code manual is a straight lift from the NIST interpreter manual with the added advantage of numerous typos.  I suspect that some of the examples in the manual have never been tested on a production version of Mach.

Thanks
Jim H

vmax.

Just fired up my Mach unit and tested it.  It works today.  Could it be a machine parameter left over from other tasks? Will now test using assigned parameter values rather than explicit values.

Again Thanks
Jim H
« Last Edit: July 30, 2009, 07:36:01 AM by small_rcer »