Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Katoh on January 20, 2014, 06:05:38 AM

Title: Code Whoe's Lathe
Post by: Katoh on January 20, 2014, 06:05:38 AM
Colleagues
I realise its being a long long while and I'm still getting this lathe together, but progress has taken me all the way to the cam stage. I am playing around with Mastercam, tried using the post-processors that are designed for Mach but they just have to many errors in them. I used then the generic Faunc post and its so much better but, I cannot get it to work, wow a what contradiction in terms there, better but does not work?
Ok I will elaborate a little the two main problems I encounter with the Faunc code is it is in diameter mode? its cutting double the size it should, and I keep getting an error on line 46? I have tried everything but still can not get it to work, very frustrating indeed!
The part is simply a piece of 30mm dia Nylon with a 21mm dia (X) x 10mm (Z)  cut out out and a 1/2"BSP thread 10mm long.
If someone can check the code and tell me where it is going wrong it would be great. Error one is the G54.1 needs to be removed first on two linesN150 and N430 which I have already done.
Thanks
Title: Re: Code Whoe's Lathe
Post by: RICH on January 20, 2014, 07:09:39 AM
Suggest you go back to the post processor for mach. There are gcode differences in Fanuc and Mach is not going to implement them when called. Make sure you are using the correct pp for Mach since some CAM's use different ones for radius and diameter mode.
Then post the gcode based on Mach pp.

I don't know nothing about Mastercam so hopefully an actual user can give some specific advice.

RICH
Title: Re: Code Whoe's Lathe
Post by: Katoh on January 20, 2014, 08:26:26 AM
Thanks Rich for the quick reply, I totally agree the Mach pp will be the one but when it posts code like this I wonder? the fanuc code looked so much better and it had the commands and tool tool changes in the correct position. as a matter of interest here is the same part with the mach pp, I have three different pp's for mach and they all do the same thing, something wrong somewhere? The problem is I'm not clue'y enough to write my own.
Title: Code Whoe's Lathe
Post by: Fastest1 on January 20, 2014, 09:57:32 AM
What version of Mach are you running? Does using the diameter mode stay during a restart or do you have to change it over from radius? As if the diameter mode is not being remembered?
Title: Re: Code Whoe's Lathe
Post by: Katoh on January 20, 2014, 05:22:16 PM
I am using version 3.043.066 and yes it does stay on diameter mode after changing from radius.
It keeps coming back with a bad character in line N450 of the fanuc code, I have gone through that so many times I can not see anything wrong with it besides being twice as large as it should?
The trouble with the mach code, it wont post an M8 or an M5 at tool change, the tool change position is in the wrong place at the end of the code on the threading cycle?
I can go through and alter the code put in m8,s and m5's and move the tool change position manually when posting, but I figure that's the fastest way for me to have an oopsy!
Title: Re: Code Whoe's Lathe
Post by: cncalex on January 20, 2014, 05:43:21 PM
Katoh,
is it correct that you want to turn the part on X - ( minus ) side rather then X+?
is the startpoint at Z-7.5 correct?
Alex
Title: Re: Code Whoe's Lathe
Post by: Hood on January 20, 2014, 05:45:18 PM
The feed in your first code is called with E, it should be F.
You need to edit your post processor or get MasterCAM to do that if you dont know how.
Quick way for now would be to edit the code with find and replace in notepad. eg tell notepad to find E1.818 and replace with F1.818
Hood
Title: Re: Code Whoe's Lathe
Post by: Katoh on January 20, 2014, 06:02:16 PM
Katoh,
is it correct that you want to turn the part on X - ( minus ) side rather then X+?
is the startpoint at Z-7.5 correct?
Alex


Alex that's correct, the part is turned on the lower left side, -X. The starting point should be z10, x0.

The feed in your first code is called with E, it should be F.
You need to edit your post processor or get MasterCAM to do that if you dont know how.
Quick way for now would be to edit the code with find and replace in notepad. eg tell notepad to find E1.818 and replace with F1.818
Hood

Hood I believed you have nailed one of the problems, must be my eyes that F looked just like an E. I don't know how to correct the post so notepad is easier at the moment. Just the diameter thing to go!

Cheers
Title: Re: Code Whoe's Lathe
Post by: Hood on January 20, 2014, 06:09:16 PM
Is the code double the dia of what it should be?
If so then its a MasterCAM issue, you could use a G51X0.5 before the code that is doubled and g50 after but its not ideal.
Hood
Title: Re: Code Whoe's Lathe
Post by: RICH on January 20, 2014, 06:13:02 PM
Again don't know squat about MasterCam, but, it is wise to create the part in CAM, pp out of CAM, and bring into Mach
all based on the same units / mode. Mix and match on modes can be bad.

FWIW,
RICH
Title: Re: Code Whoe's Lathe
Post by: Katoh on January 20, 2014, 06:36:35 PM
Is the code double the dia of what it should be?
If so then its a MasterCAM issue, you could use a G51X0.5 before the code that is doubled and g50 after but its not ideal.
Hood


Hood how can I put it? what it is posting is the diameter, so in a way Mach is reading it as the radius, if that makes sense, so yes its twice what it should be. Question for you in your youtube vid on tool positioning/offset how did you electrically isolate the bar in the chuck?

Again don't know squat about MasterCam, but, it is wise to create the part in CAM, pp out of CAM, and bring into Mach
all based on the same units / mode. Mix and match on modes can be bad.

FWIW,
RICH

i still totally agree, but until I can get the Mach pp to make more sense its just an accident waiting to happen.

Cheers
Title: Re: Code Whoe's Lathe
Post by: Hood on January 20, 2014, 07:15:36 PM
If the code is in Dia mode, ie it is correct dimension in code then sounds like Mach is in Rad mode, check to see by going to MDI and commanding a X move.
Call a G50 from MDI just in case there are any scales active, G50 will reset to 1.
If it is still wrong then as I mentioned previously 066 has issues, especially with lathes. one is that wear offsets on X are in Rad no matter whether you are in Dia  mode, so maybe it is also acting on normal X values as well.

Part in chuck was three parts, basically a part with a hole, a delrin sleeve and then the inserted part, so delrin is insulating the part in the chuck from the part the tool is touching.

Hood
Title: Re: Code Whoe's Lathe
Post by: Katoh on January 21, 2014, 08:26:03 AM
Gentlemen
Many many thanks for your help, I have tried and tried and found as Rich has said you must use the mach post, I got the fanuc post to work but the code was all over the place not just double size movements but in places they halved. Simply the best and easiest way is to alter the mach code to work as it should, I just hope I can remember what I have done to it as to do the same in the future. I will add the altered code for those that are interested.


Part in chuck was three parts, basically a part with a hole, a delrin sleeve and then the inserted part, so delrin is insulating the part in the chuck from the part the tool is touching.

Hood



Excellent Hood that was what I was basically thinking. I am going to make something up around the same lines as what you have done, brilliant!

I do apologise for my late response, another member and myself have been moving my Bridgeport mill into my garage ready for retrofitting, I really should have taken a photo as how not to move a Bridgeport, added some excitement to the day but we still got it moved only using my little 453 bobcat with home grown tynes and max lift of 300kg. Put it this way a 100m move was done on the two front tyres with a one person counterweight off the back of the bobcat, down one steep driveway up the street and up another steep driveway into my garage.
Good fun was had by all, and nobody lost an eye! LOL.
Title: Re: Code Whoe's Lathe
Post by: RICH on January 21, 2014, 08:38:38 AM
How about just attaching your xml and also post the unaltered code from the Mach pp?

RICH
Title: Re: Code Whoe's Lathe
Post by: Katoh on January 21, 2014, 07:01:36 PM
Hi Rich
Here is my xml and the unaltered post from MC.
Cheers
Katoh
Title: Re: Code Whoe's Lathe
Post by: Hood on January 21, 2014, 07:11:28 PM
You have a Mill screenset loaded, cant have that for a Lathe.
If you are prefer to use the Mill style screen then go to your Mach3 folder, copy the 1024.set then paste it on your desktop, right click and rename to maybe Katoh.lset then put back into the Mach3 folder and then load that screenset. Notice the file extension, it is lset rather than just set, that makes a big difference as it either sets a profile up as a lathe or a mill.
Hood
Title: Re: Code Whoe's Lathe
Post by: Katoh on January 21, 2014, 08:46:39 PM
Hood, Rich
My apologies I posted the wrong XML the one I posted was from the router, got them mixed up when I renamed them.
"SORRY"
here is the proper one.
Title: Re: Code Whoe's Lathe
Post by: Hood on January 22, 2014, 03:03:00 AM
Ok the code seems to load fine and looks reasonable. What are the problems with it?
Hood
Title: Re: Code Whoe's Lathe
Post by: Katoh on January 22, 2014, 05:42:22 AM
Hood
maybe I'm being a bit pedantic but the way I see it when you program a cam to do  is what you should expect to be done. I use sheetcam quite a lot and it never misses a beat, I programmed Mc to do this little job and just small things like not turning on the coolant and not switching off the spindle and not going back to home for a tool change can create a world of hurt, small errors create super large oopsy's and some very expensive ones. Compare the altered post to the unaltered plug3 as opposed to plugmachpp, you must agree things don't seem correct.
I'm no expert and quite the opposite, an absolute newby to lathe Nc work but I have run the router long enough to gather the basics or attain a small knowledge of what looks right and what doesn't. For some reason even though its wrong the Fanuc code still looks so much better.
Cheers
Katoh
Title: Re: Code Whoe's Lathe
Post by: Hood on January 22, 2014, 06:26:36 AM
No, it should do exactly as you want/tell it to. The problem itself however is not the CAM but the Post Processing, in other words your Post Processor isnt correct if it is missing things out or doing things wrong.
I dont know our situation regards MasterCAM but often when you buy CAM you get one post processor free to suit your machine, if that is the case then they should be working with you to get it correct.
 I have used a few CAM's over the last while and post processors werent quite right for my machines however I chose to modify them myself to save back and forth hassles between myself and CAM people. This was with both Dolphin and BobCAD and both of them have a lot of tools and good documentation so that you can do that, I dont know what MasterCAM is like as some are relatively easy to modify yourself, others you need a degree in computer language and others just dont allow you access.
 So really it all depends, if the PP is easily modified and documentation is good I would do it myself, if not then you will have to contact MasterCAM and get them to work with you to get it right.

Hood
Title: Re: Code Whoe's Lathe
Post by: RICH on January 22, 2014, 06:29:04 AM
Katoh,
I am thinking your problem is use of Mastercam and i can't help you with that. I would think that Mc has all of what you want to do, maybe not, and maybe you haven't mastered mastercam yet. You should be able to request a lathe pp for Mach3 Diameter mode ( if that is what you want) from Mc.

Contacting Mc or the seller you purchased it from for the pp.


There are differences in the gcode dialects of different software controllers and one must know what they are if they want to manualy change the gcode of a program for use by a different controller.

RICH
Title: Re: Code Whoe's Lathe
Post by: Katoh on January 22, 2014, 07:56:18 AM
Gentlemen thank you once again for your time and patience, Ill definitely have to get back to MC to try and work this out.
Cheers
Katoh