Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Saumur on April 30, 2008, 10:55:02 AM

Title: Conversational programation of mach3 lathe
Post by: Saumur on April 30, 2008, 10:55:02 AM
Is it possible to do a conversational programation with a mach3 lathe?

Thanks and best regards
Title: Re: Conversational programation of mach3 lathe
Post by: zarzul on April 30, 2008, 11:40:46 AM
Saumur,

Mach3 lathe does have some conversational programming in the form of what they call wizards.  There are several different ones and if you can think up new conversational programming you would like, make a suggestion and maybe someone will make them.  Users with some basic programming skills can build their own. 

I have done a couple of wizards to generate ID grooves, end groove, parabola, and some other tapers.

Arnie
Title: Re: Conversational programation of mach3 lathe
Post by: jimpinder on April 30, 2008, 01:12:46 PM
I do not understand what you mean by conversational programation.

Zarzul mentions wizards - so I assume you mean short programs to do small turning jobs.

Yes - I had a lathe, CNC ready - but coukd not, as I used to on my manual lathe, sit down and do anything.

I thought about the jobs I did on my lathe.

1. I turn down a piece of bar to a smaller radius for a certain lemgth.
2. I make axles for my railway which means turning 30 mm bar down to 25mm (to fit the wheel) and 17 mm (to fit the bearing).

Both were the same job - so I wrote a Visual Basic Script - which took 20 thous (1/2mm) cuts down to the right diameter for a given length. This is macro M201, the metric version is M301.

I put additional user DRO's on a page of the Turn Screens - Start radius, First Radius, First Length, Second radius and Second length
which the program can access.

I can now fill in the DRO's and call M201 and the machine goes ahead and cuts it. I have done a similar one to round the end of a bar - given the diameter. M202 or M302.

These Macros - as well as being used on their own, can be called up in GCode programs.

If that IS NOT what you mean, then YES - Mach 3 can also have a conversation - The Vis Basic command is "Speak" - but you do need a conversational prigram in the computer already.

 
Title: Re: Conversational programation of mach3 lathe
Post by: Hood on April 30, 2008, 02:30:32 PM
Maybe Saumur is meaning something similar to the NewFangled Solutions Addons for Mill which let you walk through wizard type pages and at the end you have the code for a complete part. Dont think this will happen with Mach but maybe someone will follow Brians lead and do one for the lathe and sell it as an addition like the NewFangled ones, any takers??? :D

Hood
Title: Re: Conversational programation of mach3 lathe
Post by: DAlgie on April 30, 2008, 10:52:07 PM
"Yes - I had a lathe, CNC ready - but coukd not, as I used to on my manual lathe, sit down and do anything."
I use version 1.84 still on my lathe. It has a nice selection of wizards in it, which work well and are easy to use. As for conversational programming, well, it's kinda what I have been asking for over the last two years, to be able to machine a part to a non standard profile, basically from  a DXF profile or similar. You can import a DXF profile but it has no real method of roughing it out unless you draw all the roughing offset lines and save them all on different layers. Those familiar with the Fanuc machines will know this as a G71 roughing, along with a G73 reentrant cycle. As I always say, I will help pay for these to be written if needed. One day....!
Title: Re: Conversational programation of mach3 lathe
Post by: jimpinder on May 01, 2008, 04:01:31 AM
Yes - but where , then do you get into the realms of full scale CAD - CAM.

I do not mind posting my Macros as I write them, which can rough down, and then finish, such as axles and things on the lathe, given various parameters to start with. I would like one for the mill to cut out letters from plastic sheet - which is my next project.

We could perhaps - and someone will tell me there already is - a part of this forum where we can lodge small macro's for other people to use if they wish - it would be a great help getting started - and something for prople to build on.
Title: Re: Conversational programation of mach3 lathe
Post by: DAlgie on May 01, 2008, 04:31:02 PM
I have used a Fanuc based lathe for years, and never needed anything more than the G71 roughing, G73 reentrant and G70 finish cycles, never used CAM for the lathe. I am using CAM for my Mach3 lathe now as a necessity, but it's somewhat slow to use and has more crash potential than the Fanuc cycles. Crashes on mills are usually nothing much, snap a mill off, etc, but it's a very scary thing on a lathe, heard of whole toolchanger turrets being broken off the ways and thrown into the door, etc. Nasty.
CAM seems to be written for mostly mill work, and is often neglected in functionality for the lathe, even though it would seem to be simple for the CAM software writers, it's only 2D after all!
Title: Re: Conversational programation of mach3 lathe
Post by: jimpinder on May 02, 2008, 05:14:12 AM
I am interested in this. I have just used Solidworks to do a part, but when I look at the GCode, I can remove big chunks of it and get the same result. This was for the mill, and the lathe is even simpler to program manually.

When you say you have used Fanuc roughing - how does it work - i.e. what does it do. It must clearly have a start radius and a finish radius for the workpiece, and, I assume you can specify the depth of cut - but how does it follow the profile i.e. how do you tell the machine what the finished profile is?

Given all that I can write a macro for roughing. I have one or too now, but they are limited to simple bar stock. If I knew how the profiles were described that would help.

Here is one for the axles I mentioned above. It roughs a bar down to a size, and puts a finished diameter on - two different diameters - for making railway axles.
It is in inches - although it only makes a difference to the depth of cut - set at 20 thou. I could have put a larger depth of cut, or even another variable in to specify the depth of cut (which would satisfy both imperial and metric users.)

The macro - named M301 - requires several user DROs - which I have put on the manual page of Mach3 Turn. It can be called from within a GCode program or just run as a standalone by entering M301 manually. X0 is the centreline of the lathe, Z0 is the business end of the workpiece.User DRO's are persistant, and return when the computer is restarted - so check each time before you use. Download to your Macro folder.

Please try it. BE CAREFUL, HOWEVER -  This particular version has not been tested. I am in the process of putting new limits on my lathe, and this version is on my office computer. I write them here, and then transfer them to my workshop computer, where any last minute bugs are ironed out.
Title: Re: Conversational programation of mach3 lathe
Post by: DAlgie on May 02, 2008, 10:57:20 AM
Here's some code to machine a part. Rapid to the clearance of thw workpiece. You call out the G71, first line is the roughing depth of cut. Second G71 line, P60 is the first line of the part profile, Q160 is the last and the U and the W are how much material to leave on the part to be finished later, and the feedrate is the F of course. Then, just write the G code of the profile start to finish. It will rough down to this profile, leaving the stock there you called out for, and then return to the start rapid in point when done. Then rapid away, call out a toolchange to the finishing tool, rapid in again and use G70 to call that same section of G code to finish, all in one line. Rapid away again and you're done. So, no need to use any CAM at all, the G71 will do it for you and the G70 finishes it using the same piece of called out code. If you think about it, it's really only like a pocket clearance program for a mill, but you don't clear one corner of it out, the rapid in point.
%
:2008
N10 G20 G95 G97 G42 M03 S750
N20 T0101
N30 G00 X3.3 Z.05 M08
N40 G71 U.06
N50 G71 P60 Q160 U.01 W.005 F.005
N60 G00 X0
N70 G01 Z0
N80 X1.485 R.08
N90 Z-1.48 R.08
N100 X1.813 R.08
N110 Z-2.2638 R.08
N120 X2.249 C.02
N130 Z-2.39
N140 X3 C.02
N150 Z-2.55
N160 X3.3
N170 G00 X4 Z4 M09
N180 T0 M01
N190 T0202
N200 G00 X3.3 Z.05 M08
N210 G70 P60 Q160 F.003
N220 G00 X4 Z5 M09
N230 M30
%
Title: Re: Conversational programation of mach3 lathe
Post by: jimpinder on May 02, 2008, 01:35:40 PM
That's great - about the biggest jump forward I've taken for a long time.

Are you saying that G70 and G71 are implemented in Mach 3.  I take it you start the job with the tool set to the bar stock diameter.

It beats my effort into a cocked hat.
Title: Re: Conversational programation of mach3 lathe
Post by: DAlgie on May 02, 2008, 02:44:37 PM
"Are you saying that G70 and G71 are implemented in Mach 3. "
No, I wish! The code I posted earlier is for a Fanuc controlled machine. I'm just pointing out how simple it is to machine complex profiles on a Fanuc machine using these three canned cycles. BUT, I think that it would be relative task to write wizards that would do this, based on the complex pocketing that Lazycam uses, it just wouldn't machine one of the corners which would be the clearance point on the corner of the barstock on the lathe. let's face it, you COULD use a lazycam pocket cycle, swap the X and Y for Z and X and let it go, but it would take a long time to machine because the tool diameter would have to be the tool tip radius, and it would be at cut speeds out where it should be using a rapid to move back to the start of thr barstock each time.
Title: Re: Conversational programation of mach3 lathe
Post by: Saumur on May 13, 2008, 10:57:35 AM
Hi guys,

thanks for your answers even tought i don't understand what you are talking about.
As you can understand i'm a mach noob; the thing i wanted to know is if it's possible to do with wizard a conversational programation.
Since i have to do always the same drawing with difference values, i wanted to know if it's possible to make a program where you just change the values you need and then it will create a g code program. These values would be: thickness, radius, tool diameter, ecc...

Thanks for your answers
Title: Re: Conversational programation of mach3 lathe
Post by: zarzul on May 13, 2008, 03:45:36 PM
Yes,  you can make a wizard that will create your gcode.  It will take some programming in basic to create the wizard.  The level of difficulty will depend on how complex the part you are doing.

Can you describe the part?

Arnie
Title: Re: Conversational programation of mach3 lathe
Post by: fisherjim on May 16, 2008, 02:32:16 PM
It would be nice if you could write a few lines of code on the main screen in Mach to place the tool where wanted, call up a wizard and put the resulting code at the end of your previously written code, do another wizard etc etc, going back and forwards in and out of any Wizard, that would be near Conversational Programming. At the moment it can't be done as the new code replaces the original code.  Perhaps it could be on the wishlist for future Mach improvements.

Jim
Title: Re: Conversational programation of mach3 lathe
Post by: DAlgie on May 16, 2008, 03:29:18 PM
Well, actually that IS how you build a program right now in turn. I use a wizard to write the G code for the first part of a program, , then open that G code to edit it and do a save as to a new file name. Then go back to the wizards again and run another one for the next part of the program you need. Open that to edit and do a cut and paste that code into the first one you saved as. It's a little laborious but all things considered, not too bad. Note that, when you paste multiple programs together you need to add rapid away moves, tool changes and just generally check to make sure you don't add a crash in there. Mach's toolpath view will mostly show you if there is a problem with a rapid through solid objects too.
   DaveA.
Title: Re: Conversational programation of mach3 lathe
Post by: fisherjim on May 16, 2008, 03:51:07 PM
Yes but you shouldn't have to do all that, that's not "Conversational" is it, and after all Mach 3 is "Professional" and as such you should be able to build a program as you go.

Jim.
Title: Re: Conversational programation of mach3 lathe
Post by: Hood on May 16, 2008, 04:16:12 PM
Quote
Yes but you shouldn't have to do all that, that's not "Conversational" is it, and after all Mach 3 is "Professional" and as such you should be able to build a program as you go.

Jim.

Mach 3 is $160, do you expect the features of a thousands of $$$$ controller for that price?
The great thing about Mach however is there is no limit to what you can do. You can go and write your own conversational for MachTurn if you wish, if its any good then you could sell it like Brian did with the NewFangled Addons for Mill. ;)

Hood
Title: Re: Conversational programation of mach3 lathe
Post by: fisherjim on May 16, 2008, 07:21:48 PM
Fair point,   but it would be nice to have a text editor within Mach3 that could assemble a program from wizards/sub programs.  Mach3 is without doubt the best easily accessable CNC control software there is, and can be used on any machine with moving axis's, and it is still evolving and will continue to evolve as long as those using it can think of ways to make the end product easier to produce.

If I was clever I would have a go at writing a conversational package for Mach, but then if I was clever I wouldn't be standing in front of a lathe all day. hi hi.

Jim