Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: BR549 on December 15, 2012, 01:57:40 AM

Title: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 15, 2012, 01:57:40 AM
SOme of the new cncs have a Gcode wrapper function where you can redirect the Y axis code to the A axis for polar machining.  Haas runs it as G107

I think it can be done with Mach3 and use an Mcode to convert mach3 to think that the A axis is really the Y axis  (not a problem there)

AND the key part the Axis could then run as a linear axis as Y . That way you can run Original Gcode without having to convert the Y arcs to line segments as MACH3 cannot do X/A or Z/A arcs. BUT if mach thinks that is is really Y then it will not know the difference and could cut some great smooth art on the rotary.

Best part it would run Gcode directly from a 2.5D cam.  No conversion needed

SO what do you think something needed/cool or delusional in need of medical help (;-).

Yes I know, late at night, can't sleep, need something to do type thingy.

Just a thought,(;-) TP

 
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Tweakie.CNC on December 15, 2012, 03:52:30 AM
Hi Terry,

I think it is a great idea and look forward to following your progress.  8)

Tweakie.
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: RICH on December 15, 2012, 07:20:30 AM
Terry,
No, not far fetched from lack of sleep at all.

Most are inplementing 4th axis to the mill. So a takeoff would be what your suggesting.
I have thought differently and that is to add milling to the lathe.

I was fooling around a few years ago on the lathe. Provided a stepper driven spindle, used a high speed rotary tool mounted on the carriage, setup the spindle as linear A and also angular, then with the Z at feed rate and A turning you could machine some nice deisgns over a shaft. I guess i was trying to slave the two axes also. The problem was a stepper for the spindle was not good since you would get changing feedrate which was not linear and limited. (As spindle speed / feedrate  was increased the stepper torque was on the down side and the torque required to turn the spindle was increasing). One of these days I'll splurge and get a servo and drive to fool arond with.

The nest step was to add the equivilant of the mill Z axis to the carriage. Still in the works .....just another project to be done.

That thinking was, once a piece was cnc turned, one could do additional machinng / milling without removing it from the lathe. Or do some things that normaly would required the 3D process and avoid setup or transfer of the piece to the mill.

I will remark that the above was for small stuff.

Play with the idea and see where it takes ya,

RICH
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 15, 2012, 01:38:11 PM
There must be something BAD wrong in my thinking as this has been much too simple. I don't have a mach3 4th axis here to do actual testing but in sim the basics are done,just putting in some safety code for dummies like me.

(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 15, 2012, 01:45:28 PM
ONE thing I have noticed for good resolution it will require a good bit of gearing reduction.  Depending on what resolution you need and what size (diameter ) piece you are cutting.

(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 15, 2012, 02:16:48 PM
OK a Question for posible users.

WOuld you want this as a macro call  M107P# Q# for ON and M108 for OFF

Or a Wizard?

Or both ?

OR OTHER ??

(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 15, 2012, 09:01:10 PM
Well I have it in Mcode form and wizard Form.  I am still testing for glitches and thinking of any more safety code to be added.  BUT so far it is a hoot.

Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Tweakie.CNC on December 16, 2012, 02:41:24 AM
Hi Terry,

I think the wizard approach would be the easiest for the inexperienced to understand and use so may appeal to a greater cross section of Mach3 users (myself included).

Tweakie.
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: RICH on December 16, 2012, 07:26:01 AM
Terry,
Both.
The wizard would be a single machining step while the macro would allow use in a gcode file with other machining steps.

True ?,
RICH
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 16, 2012, 01:33:04 PM
Actually the Wizard just sets up MACH3 to switch to cylindrical mode with Y running the A which is setup in linear mode based on the part diameter. As to Mach3 it acts exactly like it does now only the Y drives the A axis and you can move Y through A if needed.


 I just need a brave volunteer that has a 4th axis up and running to test it (;-). I was poking at Brian to make it a Mach3/4 function as new modern controllers have it Haas runs it as G107 From Brians point it would be simple.

SO here is the wizard to play with. I tried to make sure everything gets backed up BEFORE you can run it (;-) Self preservation mode. SO it worst case it gives you the option to totally restore Mach3 back to the beginning.

(;-)TP

Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 16, 2012, 02:04:34 PM
The only trick part is you have to know the steps/per for 1 rev of your 4th axis drive.  HUM I thik I just figure an AUTO way to set that part up(;-).

I'll Be back(;-).

(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 16, 2012, 04:16:38 PM
OK this should solve the Steps/per part we will let the wizard worry about that now.

New version also takes out some check points messages I forgot about.

(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Tweakie.CNC on December 17, 2012, 02:06:50 AM
Hi Terry,

Looks good to me - I will try it out later today and report back.  ;)

Just one point - the wiz transfers the Port and Pin assignments correctly but not the Low Active state.  :'(

Tweakie.
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 17, 2012, 03:26:06 AM
Tweakie I may have loaded an earlier version that setup the A axis instead of the Y axis for parameters. I need to double check the downloaded version.

As for the low active state that MIGHT not be switchable I'll double check that as well.

I have been helping my Granddaughter make/sew Denum purses made from old jeans for christmas presents.

(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Tweakie.CNC on December 17, 2012, 04:11:33 AM
Hi Terry,

It didn’t quite get the steps per unit right (should be a rectangle) but I could easily adjust that.

As you suspected - the main snag appears to be with the rapids (G0) as the Y axis Vel. & Acc. are applied to the rotary (A) axis and the A axis Vel. & Acc. are applied to the Y axis. No problem if the rotary will run as fast as the Y axis but unfortunately mine is a bit slower. Again that is easily adjusted but it would be nice if the Wiz. did it automatically.

Great work my friend.

Tweakie.
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 17, 2012, 05:09:06 AM
Tweakie try this one it should be correct.  I had the axis parameters swap WRONG I was swapping A when it should  swap Y  You can tweek the Rotary axis settings in the button code OR i can bring those settings out to the screen and the wizard can apply them.

Thanks for testing,(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 17, 2012, 05:21:03 AM
The parameter swap takes teh original A axis steps per and removes the Deg per math back down to steps per REV then applies the Circumference back to it and then you have Steps per UNIT for that diameter of the stock.

The version you tested had that wrong so the latest version shoulod get teh steps per correct based on teh original settings of your machine.

NOW the Velocity and Acceleration I just pluged in some numbers in the button code. I can bring that out to screen so you can set it for your application.

Let me know if there is anything you want or need for it.  OR have at it yourself (;-) The code is all there, NOT commented yet (;-) but there.

(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 17, 2012, 05:45:39 AM
OK I moved the rotary axis Velocity and Acceleration settings OUT to screen so you can mod them as needed.

The steps per are auto calculated now and should be correct for proper size based on part diameter.
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 17, 2012, 05:57:48 AM
We also have this available from a MCODE

M107 P## Q## R##       (  P sets Part Diameter and Q sets teh Rotary Vel and R sets the Rotary Vel) OR we can set teh variables Q R with a #parameter call to update. 

 #570=100 (Vel)
#571=50 (Accel)

Then all you have for the Mcode would be

M107 P##     where the P is the part diameter

M108 would reset to standard.

(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Tweakie.CNC on December 17, 2012, 07:45:44 AM
Hi Terry,

I changed the rotary Vel. & Acc. within the button to get my feed-rates equal on X & A(Y) and it's perfect.

My congratulations.  8)

(I'm on holiday now until the new year so will have plenty of time to play and do some more testing with this excellent idea of yours).

Tweakie.
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Ya-Nvr-No on December 17, 2012, 08:09:06 AM
Great work Grandpa TP
and thanks for posting your results Tweakie

It might be a good idea to also post what Mach3 version any project was developed with and any version it was tested with. History has proven things pop up to cause issues with some versions.

Happy Holidays.
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Tweakie.CNC on December 17, 2012, 08:43:46 AM
Quote
It might be a good idea to also post what Mach3 version any project was developed with and any version it was tested with. History has proven things pop up to cause issues with some versions.

I was using Mach Version R3.043.066 with a kernel speed of 25kHz for the tests.

Tweakie.

( Is TP really a Granddad now ??  ;D )
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Picengraver on December 17, 2012, 10:04:35 AM
Terry,
Thanks so much for this development.  Absolutely fantastic and brilliant.  Now I have get get my little custom rotary engraver back up running.

My Best,
John Champlain
www.picengrave.com
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 17, 2012, 12:04:07 PM
TP is a Grandpa X 6

SO now what do we call this THING, hopefully something snappy.

OK NOW what do I do for something to do?  I was thinking about dragging out the old Cruise control for Mill to slow DOWN the FRO when the spindle speeds drops below a set point ans see IF it could be made better.  OR?

DOes anyone know of any BIG BOY toys that the NEW CNC VMC's can do that we need?

(;-)TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 17, 2012, 03:19:03 PM
OK BIG GLITCH in creating a proper Mcode that is GOOF proof.  The param1() (also 2&3) values do NOT return to NIL after use AND I cannot find a way to clear them before closing the macro.

This prevents ANY conditional ERROR checking on the values as they are ALWAYS the same as the last use EVEN thought you never called this time ?????

Does anyone know of a way to clear the Param1() Param2() Param3() values back to NIL or even 0 ?

Bummer , I can still make it work for me BUT that precludes and error checking and disaster recovery pretty much goes out the window except by doing it manually. NOT for the masses I am afraid.

OH well , That is usually the way it goes, CLOSE but NO CIGAR. AT least we have the Wizard.

(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 17, 2012, 04:33:52 PM
OK It seems ONLY the Param3() is broken. I can make it limp along like a 3 legged dog with PQ and have at least some error checking

M107 P## Q##

P set up the diameter of the material
Q sets the function mode of the Mcode
     1    = Turn OFF the M107 and return to standard mach3
     99  = Setup the M107 Mcode , Config
     911 = Emergency Restore the system to ORIGINAL Standard

OOPS TIME is UP, BACK to Sewing with the Granddaughter (;-)

(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: RICH on December 17, 2012, 04:46:56 PM
Terry,
Keep sewing and get good at it ....have a bunch of pants that need to be hemmed!

Glad Tweakie had time to play with the wizard as my time to play has been and continues to be a big zero for some time now.

What can you do to the wizard allowing wrapping on a say a tapered piece, or convex / concave?

RICH
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 17, 2012, 06:40:10 PM
Been sewing since I was 6. Mark or measure the inseam and send them on down.

The first BLUEPRINTS I learned to read were patterns (;-) sitting with mom while she made cloths.

Around this house EVERYBODY learns to Use Acad and Sew and COOK (;-) You got your laundry to do when you turned 10.


WELL the wizard only converts Mach3 to do cylindrical machining on a cylinder mounted in the fourth using XYZ axis Gcode. If you can CAM what you want laying it out in 2.5d or 3d cam then it should cut it. 

My main purpose for working it out is so we can do Plasma cutting on PIPE/Tubing WITHOUT having to have a 4th axis CAM to work it out then fight with A axis feedrates with plasma where the A would have to HAUL THE MAIL which most don't. You cannot just SLOW down the feedrate with plasma when you want to the machine HAS to be able to maintain Feedrate to maintain the arc height.

With the M107 the feedrate is controlled as a normal XY function so there is NO radius correction needed.

(;-) TP

Title: Re: Thinking of a new wrapper function for MAch3.
Post by: RICH on December 18, 2012, 06:12:02 AM
Terry,
I was just wondering how far the wizard could be developed. I already use 3d CAD and CAM.
Thanks for your efforts,
RICH

Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Tweakie.CNC on December 22, 2012, 04:49:59 AM
A BIG "Thank You" to OzzieII for the original idea and BR549 for all the work he has done on this screen / wizard.

I had to move around some of the components to avoid conflict with my global screen items but this has now been added as a page to my standard Mach3 screen 1024.set

This method is so quick and easy to use, with existing tool-path files, it is just amazing and once again, thank you TP.

Tweakie.
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 23, 2012, 10:29:41 PM
One thing you may want to add to the screen is a scale function button. You can scale the part size up or down to help make it fit to the tube circumference.

It asks for the part size and what size you need it to be and does the math for you then applies SCALE to mach3.

Another I have on the screen is a set of DROs that give the max extents for X and Y. It assumes the origin is 0,0 and gives the sizes of X and Y.

Here is a scale function sample button code.

   'Macro M3004 Auto Scale
Dim Size1 As Double
Dim Size2 As Double
Dim Scale As Double

Size1 = Question(" Current Size ? ")
Size2 = Question(" New Size ?")
While Ismoving()
Wend
Scale = (Size2/Size1)
While Ismoving()
Wend

SetOemDro(59,Scale)
While Ismoving()
Wend
SetOemDro(60,Scale)
While Ismoving()
Wend

DoOemButton(160)
While Ismoving()
Sleep(100)
Wend

END


Just a thought, (;-) TP

Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Tweakie.CNC on December 24, 2012, 06:03:41 AM
Scale Button and the X & Y max. DRO's duly added.  ;D

Excellent thought Terry.

Many thanks.

Tweakie.
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 24, 2012, 11:19:23 AM
MIght want to add a button to set scale back to Normal 1:1.

(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Tweakie.CNC on December 24, 2012, 11:36:29 AM
Thanks Terry, I'm up to speed on that one - the reset scale function has already been added to my Return Mach3 to Normal button.  ;)

Tweakie.
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 24, 2012, 12:29:36 PM
OK time to think of something else cool that is needed.

(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Ya-Nvr-No on December 24, 2012, 02:18:18 PM
How about a function that determines feed rates based on cutting load. Knots create... SMOKE!
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 24, 2012, 03:52:46 PM
We already have Mach3 Cruise control somewhere. It monitors the spindle speed and adjusts the Speed based on RPM drop or gain.

Is that what you wanted ??? Crusie control?

(;-) TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Ya-Nvr-No on December 24, 2012, 04:04:02 PM
it would be a chip load issue, that only a controlled feed change would accomplish.
Faster speeds produce more ... SMOKE
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: BR549 on December 24, 2012, 04:40:53 PM
Can you describe what you want Mach3 to do and when ?

(;-)TP
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: jwhalin on July 11, 2014, 11:50:47 AM
Is there any tutorial or users guide for this application? I downloaded it and it installs, but I'm not sure how to implement it.
1) generate the g-code from the WRITE wizard.
2) zero the Y axis on the rotary axis center line.
3) load the Mach3 Cylindrical Mapping program and input the variables
4) reload the 1024.set
5) Set the starting Z & X positions
6) Load and RUN the WRITE g-code.

am I on the right track???
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: CycloRetro on November 16, 2015, 06:46:42 PM
Hi Terry or Tweakie
How do I install your wrapper function wizard into Mach 3. Sorry I'm very new to cnc and Mach 3 and am on the steep learning curve here
Title: Re: Thinking of a new wrapper function for MAch3.
Post by: Tweakie.CNC on November 17, 2015, 01:30:37 AM
I am sure Terry is better at explaining the process than I am but...

If you use one of the Screen Designers ( http://www.machsupport.com/software/downloads-updates/screensets/ ) then Terry's Wrapper can be added as a new page to your existing screen .set.

Tweakie.