Hello Guest it is April 19, 2024, 01:55:27 PM

Author Topic: Working on Mach 4 Lathe Postprocessor for Mastercam  (Read 1593 times)

0 Members and 1 Guest are viewing this topic.

Working on Mach 4 Lathe Postprocessor for Mastercam
« on: August 04, 2021, 02:41:33 PM »
Firstly - has anybody beaten me to it?

Secondly, the behavior of G02/03 - is this legal?

G3 X.5081 Z-5.5497 I.1025

There's an I, but no K....

Thirdly, G28 - that moves back to the home switches, right? Is there a way to programmatically set a user-defined home position?

The generic FANUC post does this:

G28 U0. W0.
G50 X1. Z-5.

To move to X1.0, Z-0.5, but in the lathe manual G50 only sets min/max spindle speeds; passing it X and Z I don't think is legal.
Re: Working on Mach 4 Lathe Postprocessor for Mastercam
« Reply #1 on: August 04, 2021, 03:18:26 PM »
So I use a Fanuc post forMach4 lathe .With lots of issues , when threading I have to change all the E to F .I delete the lines with G28 , Mach dose some weird stuff when it see's that depending where the machine is I have had it run the tool into the spindle and some times it goes to the home switch position . I have had huge problems with I & K for G02 & G03 So much that I only use R value's when programing circles . It would be great to have a working post .Maybe when you fix it you wouldn't mind sharing ?
Re: Working on Mach 4 Lathe Postprocessor for Mastercam
« Reply #2 on: August 04, 2021, 09:03:29 PM »
So it turns out you can force radius mode for arcs in the Control Definition - see image.
Re: Working on Mach 4 Lathe Postprocessor for Mastercam
« Reply #3 on: August 04, 2021, 09:16:30 PM »
Yes I know.
Re: Working on Mach 4 Lathe Postprocessor for Mastercam
« Reply #4 on: August 05, 2021, 08:02:53 AM »
So this is proceeding. Someone at Mastercam is helping me and I'm going to chip away at this for the next couple of days.

Here's the current work list:

1. Append M6 to all tool changes

2. Eliminate spurious tool number at end of file

3. Make default "move to home position" a G0 move, not a G28 - this relies on setting a home position in the toolpath

4. Prepending the recommended Mach "safe start block" to the start of a file

Does anybody have any other changes they want?

Re: Working on Mach 4 Lathe Postprocessor for Mastercam
« Reply #5 on: August 05, 2021, 10:37:38 AM »
If your changing stuff please change the G76 cycle when the code gets posted for threading Mastercam post E for the feed amount and Mach wants to see an F  .That will save some edit time.
Re: Working on Mach 4 Lathe Postprocessor for Mastercam
« Reply #6 on: August 05, 2021, 10:39:02 AM »
Is that the only change to the thread cycle? E for F?
Re: Working on Mach 4 Lathe Postprocessor for Mastercam
« Reply #7 on: August 06, 2021, 07:41:17 AM »
OK, I have those changes made.

To get rid of the G28 move to home, you need to set Misc Integer 1 to "1" in the control definition.

I also patched in the E for F in G76. There is a switch inside the post ("old style" or "new style") that on my copy was set to produce the F - so the patch shouldn't be needed if the switch is set right - but Mach never wants the E and this is (now) a Mach Lathe specific post, so I hacked that change in.

I'm now discussing how to get the post added to mastercam.com
Re: Working on Mach 4 Lathe Postprocessor for Mastercam
« Reply #8 on: August 06, 2021, 08:28:09 AM »

Thirdly, G28 - that moves back to the home switches, right? Is there a way to programmatically set a user-defined home position?


You can use G30 instead of G28.  Populate the System VARS#  5181-5183 (5181 = X 5182 = Y 5183 = Z).  You put in the Machine Position you want it to go to into these variables. 
It is best to have homing on your machine since this is where it will go every time. 
It won't go to the home position unless you leave the #VARS 0.00
Chad Byrd
Re: Working on Mach 4 Lathe Postprocessor for Mastercam
« Reply #9 on: August 06, 2021, 08:59:02 AM »

You can use G30 instead of G28.  Populate the System VARS#  5181-5183 (5181 = X 5182 = Y 5183 = Z).  You put in the Machine Position you want it to go to into these variables. 
It is best to have homing on your machine since this is where it will go every time. 
It won't go to the home position unless you leave the #VARS 0.00

We're having that discussion here: https://www.machsupport.com/forum/index.php?topic=45115.0