# Machsupport Forum

## Mach Discussion => General Mach Discussion => Topic started by: woodeye on March 16, 2008, 08:58:46 PM

Title: Formula use in Mach 3 secret
Post by: woodeye on March 16, 2008, 08:58:46 PM
I have searched for information regarding use of formulas in Mach 3 and can find nothing explaining the use of this feature.  I am assuming that from all outward appearance that it was intended to modify axis interpolation?  I have tried several  times to use simple formulas to test and cannot get anything to work.  I have been successful in engraving on the perimeter of a cylinder by substituting Y axis for A axis for  my rotary table and am now wanting to do circular iinterpolation on the end of a cylinder that is rotating in my rotary table and need a formula that would adjust the axis as the cut moves to the center of rotation and visa versa. What is the secret to get any formula to work with Mach 3 ??

Thanks, Woodeye
Title: Re: Formula use in Mach 3 secret
Post by: Graham Waterworth on March 17, 2008, 05:47:45 AM
Not sure what you mean, this code would move the A and Z axis to form a 4 pitch scroll on the end of a bar with the indexer horizontal and a right angled head.

G00 X0 Y0 A0 Z25.
G01 Z0 A1440. F500.

As for formulas :-

You can do things like this :-

#1=500
#2=10
#3=SIN[#1]
#4=COS[#2]
G00 X[#3] Y[#4]

Graham.
Title: Re: Formula use in Mach 3 secret
Post by: woodeye on March 17, 2008, 09:50:26 AM
Graham,

Thanks for your prompt response to my quiry.  I am trying to work on the end of a cylinder.  Actually I am attempting to do ornamental work on wood boxes and have worked out how to make my cuts on the perimeter including circular work, circles , ellipses, etc, and now am trying to do the same on the end of the cylinder which would actually be the top of these boxes held in a rotary table much like a lathe.  I know that I will need some formula to work out the moves .  An example of what I am trying to do would be to scribe a circle using the rotary motion of A combined with either Y or Z motion.  I do not understand how to use the formula feature in the configuration panels for Mach 3.  As I stated previously,  I can't seem to get any formula to do anything.  I am a newby and the use of the fomula feature is a big mystery.  How do I get mach 3 to compensate for the radius of the tool from the center of rotation of the A axis as it scribes a circle that is not concentric to the A axis?  I will try the code that you have shown in your post but have to ask what the formulas you listed would do??

Thanks, Woodeye
Title: Re: Formula use in Mach 3 secret
Post by: woodeye on March 17, 2008, 10:56:01 AM
Graham,

I am also a newby when it comes to this forum and how to navigate and get around.  I noticed that there is an icon that show you on-line, how does one set up a chat session or is this taboo?  Struggling here to come on board.

Thanks, Woodeye
Title: Re: Formula use in Mach 3 secret
Post by: vmax549 on March 17, 2008, 12:52:26 PM
Hi Woodeye, try this post,  http://www.machsupport.com/forum/index.php/topic,4032.0.html

(;-) TP
Title: Re: Formula use in Mach 3 secret
Post by: Graham Waterworth on March 17, 2008, 01:22:15 PM
If you want to mill a circle in the end face you need to tell mach that arcs are on the YZ plane, this is done by G19.

You can then mill a circle with G02/03 commands just like you would in XY plane.

(Mill a 20mm dia circle on YZ plane)

G21 G40 G00 G90 (standard start up lines)
G19                     (set to YZ plane)
G00 X-1. Y0 Z0     (rapid to start point)
G01 X.25 F100.     (feed into job)
G03 K-10.             (do a full 20mm dia circle)
G00 X0                (rapid clear)
G17                     (back to XY plane)
M30                     (end program)

Graham.
Title: Re: Formula use in Mach 3 secret
Post by: woodeye on March 17, 2008, 02:35:26 PM
Graham,

Ok, I have that.  Now, imagine that I want to cut a series of these 20mm circles around a face that is able to rotate on the A axis, this would form a ring of 20mm circles, the spacing and overlap dependant upon the number of these 20 mm circles that I cut, as well as the radius of these circles from the center of the rotation of A axis.   I know also that I could simply advance A for each subsequent 20mm circle, but is there not a way to coordinate the motion of A and Z to scribe the circle?  In other words substituting the motion of A for Y, which in itself being rotary, would require some sort of interpolation being that the feed would be constantly changing as the cut moved near center and out again.  I just thought that the formula axis correction could be used to make this adjustment in order to scribe a circle on the end of a cylinder held in a rotary table.

Thanks, Woodeye
Title: Re: Formula use in Mach 3 secret
Post by: Graham Waterworth on March 17, 2008, 03:30:56 PM
Yes it could be done, but for what reason, you would just be making the job harder than it needs to be, or are you trying to do something else?  :)

Graham.
Title: Re: Formula use in Mach 3 secret
Post by: woodeye on March 17, 2008, 05:15:51 PM
I used the circle as an example to try and make myself understood but I wish to go beyond that example to patterns that might encompass the entire surface or most of it and that would require rotation of the A axis due in part to the fact that my cutter would be restrained by my X-Y table (Taig mill) upon which my rotary table (Shurline) is mounted. By incorporating the A axis motion I figured that I could generate patterns that would wrap around at a given distance from center.  Don't misunderstand me, I really do subscribe to the kiss method as well and am in no way wanting to complicate things beyond what they already are.

Could you provide guidance or where to find information in regards to using the axis formula corrections in Mach 3?  Is there any written material on this anywhere?  I mean, like do I enter a formula in the formula axis correction line as provided in the dialog box under function cfg's and where do I find the format to use.  I envision formulas such that I could state that X is a percent or fraction of Y or visa versa and when I generate a code that would otherwise create a circle, I get an ellipse instead.  I have tried in vain to enter any sort of formula that would affect any motion in Mach 3, all I get is errors in my attempts.  What I am looking for is basic information in using formulas in Mach 3.

Thanks, Woodeye
Title: Re: Formula use in Mach 3 secret
Post by: Graham Waterworth on March 17, 2008, 05:43:11 PM
OK,  so why not lay the indexer on its back and work in X&Y ?

The formula functions can be as simple as x*2 so then if you go to MDI and type G00 G91 X1. the DRO will move 2.

The formula would double all X moves in a program.

Graham.
Title: Re: Formula use in Mach 3 secret
Post by: woodeye on March 17, 2008, 07:01:23 PM
Graham,

I tried the formula function X*2 as suggested by entering this on the line for X in the formula axis correction box under functional cnfgs and it doesn't work.  I tried it several times and also the same formula for y as Y*2 and it either does nothing or returns a dro as if no formulas were enabled.  Also strange results where even though X1 is entered in MDI, DRO shows motion in A.  When attempting test in formula axis  correction box I get error found on position 1  General parser error blocked!  So I apparently have a problem with Mach 3 and using the formulas.

Thanks, Woodeye
Title: Re: Formula use in Mach 3 secret
Post by: Graham Waterworth on March 17, 2008, 07:07:16 PM
Here is a screen shot of what my set up is showing.

Graham.
Title: Re: Formula use in Mach 3 secret
Post by: woodeye on March 17, 2008, 07:14:32 PM
yes, that is same as what I show also. However when I enter the test I get the error I mentioned previouslly and when inputing in MDI the formula is not applied even though I have it enabled.
Title: Re: Formula use in Mach 3 secret
Post by: woodeye on March 17, 2008, 07:17:59 PM
Graham,

What I meant to say is that is what I show except for DRO
Title: Re: Formula use in Mach 3 secret
Post by: Graham Waterworth on March 17, 2008, 07:26:27 PM
Ok, are you using a licensed version of Mach3? , Demo version may not have this function.

What version are you using? I am using V3.037

Have you tried a re-install of Mach?

Other than this I have no idea why mine works and yours will not. Sorry you have beaten me on this one.

Graham.

Title: Re: Formula use in Mach 3 secret
Post by: woodeye on March 17, 2008, 07:28:06 PM
Graham,

I rebooted computer and Mach 3 set up formula for X as X*2 enabled formula and then entered G00  G91 X1 in MDI and I got a move in A of 1, go figure???
Title: Re: Formula use in Mach 3 secret
Post by: woodeye on March 17, 2008, 07:33:40 PM
Graham,
YEs, I am using licensed version of Mach 3 and it has been working fine except for this formula feature.  My version is 2.60.  I thought that I had updated just a couple of weeks ago with lockdown version.  Boy It looks like I might be out of date.

I really appreciate the time that you have spent with me today.  I'll see if I can reinstall & update.  It looks like my frustration has been in the basic malfunctioning of this feature in Mach.

Thanks,

Woodeye
Title: Re: Formula use in Mach 3 secret
Post by: woodeye on March 17, 2008, 09:11:29 PM
Graham,

I downloaded latest Mach release and installed and now formulas are working as they should.  Now Maybe I can figure out how to use them.

Thank you once again for your help.

Woodeye
Title: Re: Formula use in Mach 3 secret
Post by: Graham Waterworth on March 18, 2008, 05:38:53 AM
:)

Graham.