Machsupport Forum
Mach Discussion => Feature Requests => Topic started by: leif1954 on February 09, 2012, 01:04:24 PM
-
Hi-
I'm an absolute novice, new to the CNC world and am trying to find out if there is a wizard/macro for use with Mach3Turn, that will allow me to use a probe to examine a workpiece. The workpiece will be held in a lathe collet. I simply need an X and Z axis control, to allow me to create a point line (rather than a point cloud), which I can then import into BobCAD, convert to a spline and then POST to Mach3.
I know there's a Wizard within Mach3 for probing, but it is 3-D (read that as "mill"), which won't work for 2-D, from what I have tried. Seems like it would be a fairly simple change to the Wizard, to allow it to be used for either mill or lathe digitizing, but I guess not as many people digitize lathe surfaces as they do with mill surfaces?
Any assistance on this would be most appreciated!
-
How about taking a picture ,a few measurements, and drawing over it in CAD?
Could use CopyCat and then change out X and Y to X and Z in the code.
RICH
-
That would be very easy to do have a start point end point for Z and start point for X.
Open points file and name with M40
G31 X0 and then advance Z then repeat until the end save the point file. Use a programable sub routine for resolution control.
M41 to close the points file and save.
Could be done with a wizard or a stand alone programable macro.
Just a thought, (;-)TP
-
Rich--
the part is so small, that trying to use a picture and measurements, I think would be futile. The critical curve I am looking at is a total of about 1.5mm in length.
BR549--
I think this method is worth investigating. I will probably use the macro approach first, since I'm unaware of how to write a wizard. Is there any source of info about writing wizards?
Thanks for all the help!
-
THere is a section in the "Customising Mach2" manual on wizards.
The Programable front end macro would be something like
'Macro for probing X/Z M1000
Xstart = Question("X start position?")
Xstart= (Xstart + .020)
SetVar(4,Xstart)
Zstart= Question("Z start position?")
SetVar(3,Zstart)
Res= Question("Z step Value?")
SetVar(2,Res)
Lcnt= (Zstart / Res)
SetVar(1,Lcnt)
End
THe Gcode Probing program would be something like
M1000 ( open macro to program probe funtion)
M40 (open and name point file)
M98 P1 L#1
M41 (close point file)
M30
o1
G31 X0.000
G0 X#4
#3=[#3-#2]
G0 Z#3
M99
%
Or you could store the Variables on a page with DROs and just call the Gcode program when needed.
OR you can program the variable from the MDI and then just run the Gcode #1=3.000 #2= 1.000 #3= 2.000 #4= .001
then load and run the Gcode Probe program.
There are many ways to do it, Your choice.
(;-) TP
-
Wow...
You're right, of course...there is, almost always, more than one way to solve a mechanical operations problem. As for computer programming, YES, there are also lots of ways to approach them too.
I have been surprised at the sheer LENGTH of some G-code, where it looks like a very "manual" approach:
eg:
G0 x1 y1 z1
G0 x1.0001 y1 z1
G0 x1.0002 y1 z1
etc...
just to move the x-axis!
I knew there had to be a better way.
Now, I just need to find the time with my lathe, to try this all out. I'm still waiting on delivery of the probe, so I'm not in a rush...yet.
Thanks again!!