Hello Guest it is April 24, 2024, 11:52:12 PM

Author Topic: Gcoding a G31 probing Polar array  (Read 6178 times)

0 Members and 1 Guest are viewing this topic.

vmax549

*
Gcoding a G31 probing Polar array
« on: November 03, 2007, 11:12:47 AM »
Help Graham, I am working on a g31 CMM  probing project and I keep getting lost in a sub routine

What I am trying to do is start from a point and probe out 5". Then return to the start point, next probe out to a point that is rotated .5 degrees from the last point. Then repeat it a total of 720 times to do a ful circle.

I can do the Trig to get the next point and I understand how to use the stored parameters, but I get lost in trying to do the function where it can be repeated as a sub.

I would like to be able to do a probe from inside to out in a polar array AND be able to do an outside to inside  polar array.

Any Ideas (;-) TP
« Last Edit: November 03, 2007, 11:15:36 AM by vmax549 »

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: Gcoding a G31 probing Polar array
« Reply #1 on: November 03, 2007, 03:31:05 PM »
Hi Terry,

These are off the top of my head, give them a try, you never know they may just work.

Graham.


%
O0001 (PROBE MACRO IN TO OUT)
G40 G40 G00 G90 X0 Y0
T1 M6
#1=720  (number of steps)
#2=5.25 (radius)
#3=0  (start angle)
#4=[360/#1]
#5=#3
G00 Z1.
X0 Y0
Z-.1
(OPEN FILE FOR STORING POINTS)
M98 P0002 L#1
(CLOSE FILE FOR STORING POINTS)
G00 Z1.
M30

O0002 (IN TO OUT SUB)
#5=[#5+#4]
#6=[sin[#5]*#2]
#7=[cos[#5]*#2]
G31 X#6 Y#7 F10.
(READ STOP POINT and store it)
G00 X0 Y0
M99
%



%
O0003 (PROBE MACRO OUT TO IN)
G40 G40 G00 G90 X0 Y0
T1 M6
#1=720  (number of steps)
#2=5.25 (radius)
#3=0  (start angle)
#4=[360/#1]
#5=#3
G00 Z1.
X0 Y0
Z-.1
(OPEN FILE FOR STORING POINTS)
M98 P0004 L#1
(CLOSE FILE FOR STORING POINTS)
G00 Z1.
M30

O0004 (OUT TO IN SUB)
#5=[#5+#4]
#6=[sin[#5]*#2]
#7=[cos[#5]*#2]
G00 G90 X#6 Y#7
G31 X0 Y0 F10.
(READ STOP POINT and store it)
M99
%

« Last Edit: November 03, 2007, 03:35:00 PM by Graham Waterworth »
Without engineers the world stops

vmax549

*
Re: Gcoding a G31 probing Polar array
« Reply #2 on: November 03, 2007, 06:41:16 PM »
I'll Give them A try(;-)

Ihad finally cleared out the brain FOG and finish up this version of an interior G31 Array. The M1299 Macro calibrates the ARRAY.

o0001

n1   M1299
n2   M40
%
G90
n40  #103=0 
n70  #106 = [#100 + #102 * COS[#103]]
n71  #107 = [#101 + #102 * SIN[#103]]
n72  G31 X #106 Y #107 
n73  G0 X#100 Y#101
%
n72  M98 P2 L#108
N73  M41
N74  m30

o0002 (sub)
n80  #105=[#103+#104]
n90  #106 = [#100 + #102 * COS[#105]]
n100 #107 = [#101 + #102 * SIN[#105]]
n101 G90
n110 G31 X #106 Y #107
n120 G0 X#100 Y#101
n121 #103 = #105
n131 m99

===================================
' M1299 G31 Polar Array
Xpos= getdro(0)
Ypos= getdro(1)
Pspeed= Question (" Probe Feed Rate")
Rleg= Question ("Input Max Leg Length")
Linc= Question ("Input leg Separation Angle")
Nrep= (360 / Linc)

Setvar (100 , Xpos)
Setvar (101 , Ypos)
Setvar (102 , Rleg)
Setvar (104 , Linc)
Setvar (108 , Nrep)
Setvar (109 , Pspeed)
Code " F#109"

End


Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: Gcoding a G31 probing Polar array
« Reply #3 on: November 03, 2007, 08:32:42 PM »
Hi Terry,

Looks ok, is it working?

Graham.
Without engineers the world stops

vmax549

*
Re: Gcoding a G31 probing Polar array
« Reply #4 on: November 03, 2007, 09:47:52 PM »
Hi Graham, it works very well. You move to any position inside of the object. Then call the gcode file. It will start up the m1299 macro which allows you to calibrate the center startpoint, size, and resolution of the array. You can set length of the leg and the degree of separation and the feedrate.

Then it will ask you to name the saved points file. At that point it turns control back over to the Gcode program.

At that point it makes a calibration run and then proceeds to the sub program. It then proceeds as programed from the calibration macro to perform the array. At completion it closes the points file.

It is not 100% able to get to all the possible nucks and crannies in one cycle but it will gather the bulk of the points and then allow you to use OTHER routines to gather the rest of the isolated areas. 1/2 arcs, 1/4 arcs, square inside and outside arrays, along with the circle arrays,  etc

I am working on making a CMM page for MACH that will allow a host of functions to gather data points. Now that we have tip comp for the g31 that is a reality. Now IF we could get jog probing we would have it whipped.(;-)

PLease let me know when you have a copy of your book, my young ones need a good primer to fall back on my manual coding is so rusty the flakes fall off of me every time I sit down and write some code. I am trying to get them to learn it the manual way first then progress on to CAM. That way the CAM produced code will make sense.

vmax549

*
Re: Gcoding a G31 probing Polar array
« Reply #5 on: November 04, 2007, 10:24:41 AM »
Good mornig Graham. I resampled the calibrated hole and imported the points into ACAD, then played connect the dots and created the hole. The calibrated hole measures .9950 and the drawing shows .9946. Close enough for what we are working with probe wise.

What we need now is a simple 2d points to gcode converter.

(;-) TP

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: Gcoding a G31 probing Polar array
« Reply #6 on: November 04, 2007, 10:30:27 AM »
Email me the output file, you never know I may get bored later.

Graham.
Without engineers the world stops