Hello Guest it is December 10, 2019, 08:59:49 AM

Author Topic: I could use a GCode file for Lathe  (Read 7500 times)

0 Members and 1 Guest are viewing this topic.

DaveDoesIT

*
I could use a GCode file for Lathe
« on: July 12, 2008, 06:46:56 PM »
Hi People,

Still trying to get my Emco 5-PC to do more than just jog.

Could someone point me at a GCode file (or paste on in a reply) for a simple part so I can test this thing.

I am not sure if the problem is in my GCode file or the machine at this point.

I have not done lathe stuff before so I am flying a little blind.

I checked the "Shard GCode" group but nothing there.

Thanks in advance.

Dave

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: I could use a GCode file for Lathe
« Reply #1 on: July 12, 2008, 06:52:51 PM »
Easiest thing would be to open one of the wizards and just enter the dimension in it to get some code for testing.
 I can post some code for you but my lathe has custom Mcodes for spindle so possibly it wouldnt be the best for testing.
 What exactly are you having a problem with?
Hood

DaveDoesIT

*
Re: I could use a GCode file for Lathe
« Reply #2 on: July 12, 2008, 07:26:01 PM »
What exactly are you having a problem with?

Hi Hood,

<grin> I am on a steep learning curve here, never done lathe stuff before (lotsa serious mill stuff professionally), I have never used Mach3 before and I have never used anything Enco before so flying blind may be a bit of an understatement.

I have not tried using the wizards but will scoot out to the garage and give them a shot.

Basically I would like a small Gcode file that is known to work with the 5PC and Mach3. That removes me and the XP computer from the loop. I am sure I will pick up the lathe stuff quickly but for now I would just like to see  it make correct moves and cut a simple part.

Once I have done that I can evaluate whether to keep the Emco electronics or jump up to Geckos and 150 oz-in motors with 1:1 gearing as Ron described.

Thanks for the reply.

Dave

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: I could use a GCode file for Lathe
« Reply #3 on: July 12, 2008, 07:41:34 PM »
I am new to CNC Lathes as well, have been using the mill with Mach for 4 yrs or more but its just really the last 3 months or so that the lathe has been functioning. I thought the lathe would be much easier than the mill as it only has two axis as opposed to 3 of the mill, I was wrong :D There are just so many more things you have to think about with the lathe especially when you have a rear turret with 6 tools sticking out of it and you have to think about clearance issues with the chuck jaws, tailstock etc. Add to that a Front tool post that has drills and boring bars in it and things can soon lead to crashing,scraping and banging sounds if not carefull :D

The wizard should let you do some simple code which should do for your lathe, might even just be good enough to hand code a few lines to get into the way of it.

Hood

DaveDoesIT

*
Re: I could use a GCode file for Lathe
« Reply #4 on: July 12, 2008, 08:16:41 PM »
and things can soon lead to crashing,scraping and banging sounds if not carefull :D

The wizard should let you do some simple code which should do for your lathe, might even just be good enough to hand code a few lines to get into the way of it.

Hi Hood,

Thanks again for the reply. I tried two wizards and managed to make one work for turning a taper. The only thing was it cut the taper in reverse! :)

It also moves in to the material rather than away from on it on the clearance returns. The Z axis is correct but the X is reversed. Not being familiar with Mach3, I have not yet found how to change that. Maybe it is all in the Plus and Minus signs in the wizard.

I think I might just scrap the whole idea of using this lathe and dump it at the local thrift store for a tax deduction.

Mach3 seems quite difficult to learn compared to mainstream CNC stuff for mills and I am not sure I can be bothered. I don't have any projects in mind for the lathe, I just bought it as it seemed like a good deal for 300-bucks, in barely used condition.

I can now see why it was priced so. LOL

Dave

Offline RICH

*
  • *
  •  7,376 7,376
    • View Profile
Re: I could use a GCode file for Lathe
« Reply #5 on: July 12, 2008, 08:29:58 PM »
Dave,
I started with MACH Turn. Using a little barebones Sherline with no limit swithes etc and have the gcode for a number of parts for a model kit I'm making. So if you want some tested files that worked I can post. The stuff is on the small side of things, like 1/8" to 1" stock will be required but at least you can play around for pennies. I would also recomend starting with the wizards, just take a few seconds to look at how the cutting is done as it may define what kind of tool you need to use.
Do you use a CAD program?
I made a post some time ago about using Lazycam for the lathe. For that I can give you a pesky little file that works
but some reason was a challenge when I first started using Lazycam. So it may help in the learning curve.
Your nickle,
RICH

Offline RICH

*
  • *
  •  7,376 7,376
    • View Profile
Re: I could use a GCode file for Lathe
« Reply #6 on: July 12, 2008, 08:51:17 PM »
Dear Dave,
After reading your post, I just must say this, you will think you died and went to heaven when you get a lathe working in MACH.
It takes some learning but it's worth the effort. I am sure you can drive a car but i would bet money you couldn't just place yourself into my 66 mustang and drive it 20 feet! As a convert weening myself off another program, there are some things, manny things, that in the big picture MACH gives you. But then it's your decision.

RICH

Offline Chip

*
  • *
  •  2,056 2,056
  • Gainesville Florida USA
    • View Profile
Re: I could use a GCode file for Lathe
« Reply #7 on: July 12, 2008, 09:53:59 PM »
Hi, Dave

It's not bad, To reverse your X axis, Config, Homes and Limits page, X "reverse" collum, change state.

Z- moves to spindle, X- moves to center (front tool pos.).

Lathe G-code can be created in many ways, Hears just a couple of moves.

g90 ; ABS mode
g20 ; Inch mode
G00 x0 z0; start end of stock center tool x Z and zero axies
G01 x.5 F5; X moves out .5 at f5 speed
G01 Z-1.0 ; Z moves tordes spindle 1.0 f5
G01 X.45  ; X moves in .05 f5
G01 Z0    ; Z moves
G01 X.45 Z-0.050 ;X Z move
G01 x.40 Z0 ;X Z move
G01 Z0    ; Z moves away from spindle to start point
G01 x0    ; X moves to start point

M30 ; Prog return to top
%

Don't Give UP, Chip
« Last Edit: July 12, 2008, 11:24:03 PM by Chip »

Offline jimpinder

*
  •  1,233 1,233
  • Wakefield, West Yorks, UK
    • View Profile
Re: I could use a GCode file for Lathe
« Reply #8 on: July 13, 2008, 04:10:39 AM »
We are firing code at Dave - but I think he needs to know how to get started - perhaps.

The most important thing is - where is your 0.0 position in your code.
The X0 position is usually down the centreline of the lathe. The Z0 position is normally on the end of the workpiece. So -

Put a piece of barstock in the machine, and jog up to it and take a facing cut across. (You can do this with the jog buttons, if you run the speed down to about 10%) Zero your Z axis.
Move your tool out, and down the barstock a little, and then, with the jog, touch the tool on the stock. This is you X position, but you need to measure the diameter (or radius) of the barstock and enter it into the X DRO. You can run the lathe in either diameter mode, or radius mode, which ever you feel more confident with. In diameter mode, you enter all X axis workings to the finished diameter you want, in radius mode, you have to half these (obviously) .

Z minus is towards the chuck, Z plus is away from it. X minus is towards the centreline, X plus is away from it. If you enter in the MDI line (not jogging becasue the jog buttons are changable) a plus move and check if the axis goes the right way. If it does not, then on your Config/Ports and Pins/Motor Outputs, change the DIR pin to "Active Low" or vica versa. This will reverse the movement of the axis. You will then need to check your jogging buttons and make sure they move the axis the same way - Config/Hotkeys

A lot of lathe work is repetative, as Hood said, and, therefore, a lot of us make use of macros for say thinning down barstock, where you might make 10 cuts to get down to where you need - all the cuts are the same, just 20 thou or so deeper.

On page one of my lathe, I have several User DROs which I can fill in with lengths, cut, feed and radius etc, and I have written several macro's to take this information, and then write the GCode - rather like the wizards - but it writes the code on the fly, whilst the machine is running. You are welcome to my lset, and macros if you would like them. They do simple work, like facing, thinning down, cutting axle ends (two different diameters), boring, and rounding off bar ends. I work in steel.

Keep at it, when the machine starts running as you want it, it gives you a nice buzz - but then you have to run round getting rid of all the shavings it makes - and it makes them faster than you can get rid of them.





« Last Edit: July 13, 2008, 04:20:32 AM by jimpinder »
Not me driving the engine - I'm better looking.

DaveDoesIT

*
Re: I could use a GCode file for Lathe
« Reply #9 on: July 13, 2008, 05:12:38 PM »
We are firing code at Dave - but I think he needs to know how to get started - perhaps.

Hi guys,

Thanks for all the encouragement, I will stick at it for a while longer then.

Jim you have hit the nail on the head. Just reading your posting has made a lot of stuff clear. I had been trying to figure it out by trial and error. As you and Hood have alluded to,  I have no idea what I am doing with this lathe stuff. Thanks for taking the time to outline the basics to get me started.

Thanks to all for the offer of code and macros etc, and I may take up all offers, but I will give the current suggestions some work before I get to the tricky stuff.

I will give it all a shot tomorrow as today I have sworn myself to getting my Tax stuff to the Accountant tomorrow as August extension time fast approaches and I am still procrastinating. <grin>

Dave