Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Refugee from Fusion 360 looking for advice


RecceDG
 Share

Recommended Posts

OK, I'm looking everywhere in Mastercam for Solidworks 2022 and I can't find "Align to Z" anywhere.

lathe_planes.png

 

Where is it hiding?

 

Placeholder: This is the GCode the final finishing pass generated when I posted it. I'm going to analyze it later. Pay no attention just yet.

%
O0000
(PROGRAM NAME - LATHE_LEAD_SCREW_V3.0_OP3)
(DATE=DD-MM-YY - 03-08-21 TIME=HH:MM - 23:13)
(MCAM FILE - M:\DOCUMENTS\DENNIS\SOLIDWORKS PROJECTS\LATHE_LEAD_SCREW_V3.0.SLDPRT)
(NC FILE - D:\DOCUMENTS\MY MASTERCAM 2022\MASTERCAM FOR SOLIDWORKS\LATHE\NC\LATHE_LEAD_SCREW_V3.0_OP3.NC)
(MATERIAL - STEEL INCH - 1030 - 200 BHN)
G20
(TOOL - 3 OFFSET - 3)
(TOOL 3  INSERT - DCMT32.51)
G28 U0. W0.
G50 X1. Z-5.
G0 T0303
G97 S1587 M03
G0 X.4815 Z-5.0751 M8
G50 S2800
G96 S200
G99 G1 X.4621 Z-5.0926 F.006
X.3031 Z-5.236
Z-5.4472
G3 X.5081 Z-5.5497 I.1025
G1 X.5281 Z-5.5324
G28 U0. W0. M05
T0300
M30
%

 

Link to comment
Share on other sites

Huh. Must be an edit time limit - I had intended to edit out the GCode and do the analysis separately.

OK, let's take a look, using this as reference: Mach4 Lathe GCode Manual.pdf (machsupport.com)


O0000
(PROGRAM NAME - LATHE_LEAD_SCREW_V3.0_OP3)
(DATE=DD-MM-YY - 03-08-21 TIME=HH:MM - 23:13)
(MCAM FILE - M:\DOCUMENTS\DENNIS\SOLIDWORKS PROJECTS\LATHE_LEAD_SCREW_V3.0.SLDPRT)
(NC FILE - D:\DOCUMENTS\MY MASTERCAM 2022\MASTERCAM FOR SOLIDWORKS\LATHE\NC\LATHE_LEAD_SCREW_V3.0_OP3.NC)
(MATERIAL - STEEL INCH - 1030 - 200 BHN)
G20 [INCH MODE - yup]
(TOOL - 3 OFFSET - 3)
(TOOL 3  INSERT - DCMT32.51)
G28 U0. W0. [Hm. G28 for Mach uses Format: G28 X__ Y__ Z__ A__ B__ C__ where the number after the axis is the intermediate point.]
G50 X1. Z-5. [In Mach, G50 is min/max spindle speed for CSS mode. X1, Z-5 is the home position I specified, so this line and the previous are setting the home position]
G0 T0303 [Not sure why there is a G0 here... Tool pre-call is right, but doesn't include the M06 tool change]
G97 S1587 M03 [Constant speed mode, not quite 1600 RPM, turn spindle on - weird speed, where is this coming from?]
G0 X.4815 Z-5.0751 M8 [Rapid to start point, turn coolant on - need to change this to M7 because I have mist, not flood - machine config?]
G50 S2800 [g50 again - but this time it is right - set max speed to 2800, which is my configured max spindle speed]
G96 S200 [CSS mode 200 ft/min - I thought I had this set to a flat speed in the operation params, have to check]
G99 G1 X.4621 Z-5.0926 F.006 [Set feed as per-rev, then start cutting]
X.3031 Z-5.236 
Z-5.4472 
G3 X.5081 Z-5.5497 I.1025 [Arc move.No K? Mach manual goes on at length about arcs and has G90.1 and G90.2 to switch between absolute and incremental modes. Going to have to see what this toolpath looks like in Mach's visualizer to see if this is OK]
G1 X.5281 Z-5.5324 
G28 U0. W0. M05[Try to go home but wrong format for Mach - and dangerous on my machine - Spindle off]
T0300 [Why does it try and return to tool offset 0 here?]

OK, so based on this, here is what I think the program should look like. How many of these are config switches, and how many require editing the post processor?

%
O0000
(PROGRAM NAME - LATHE_LEAD_SCREW_V3.0_OP3)
(DATE=DD-MM-YY - 03-08-21 TIME=HH:MM - 23:13)
(MCAM FILE - M:\DOCUMENTS\DENNIS\SOLIDWORKS PROJECTS\LATHE_LEAD_SCREW_V3.0.SLDPRT)
(NC FILE - D:\DOCUMENTS\MY MASTERCAM 2022\MASTERCAM FOR SOLIDWORKS\LATHE\NC\LATHE_LEAD_SCREW_V3.0_OP3.NC)
(MATERIAL - STEEL INCH - 1030 - 200 BHN)
G20
G0 G54 G17 G40 G80 [Safe start line - Rapid mode, fixture offset 1, ZX plane, turn off nose compensation, cancel canned cycles]
(TOOL - 3 OFFSET - 3)
(TOOL 3  INSERT - DCMT32.51)
T0303 M6 [Select tool 3 and execute change]
G0 X1. Z-5 [Normal rapid move to user-defined home with no G28 nonsense]
G97 S1587 M03 [Turn spindle on. I guess it uses G97 to keep the spindle RPM from surging during the prelim move - but where did 1587 RPM come from?]
G0 X.4815 Z-5.0751 M7 [M7 vs M8 is almost certainly a machine config switch somewhere]
G50 S2800
G96 S200 [Need to verify where this came from in the toolpath config, but is OK]
G99 G1 X.4621 Z-5.0926 F.006
X.3031 Z-5.236
Z-5.4472
G3 X.5081 Z-5.5497 I.1025 [Probably OK - need to verify]
G1 X.5281 Z-5.5324
M05 M09 [Shut coolant off too]
G0 X1. Z-5. [Normal rapid back to home]
M30
%
Link to comment
Share on other sites

I'm using the generic FANUC post.. but ack, I'll take a look at that. 

I also see there is a coolant button which undoubtedly lets me switch between flood/mist/no coolant.

I figure about half of the "problems" with my posted code are just path parameters not properly set, and the other half are postprocessor tweaks. I had a similar experience with Fusion.

Link to comment
Share on other sites

After some mucking about with the toolpath parameters and the control definition, I got to here:

%
O0000
(PROGRAM NAME - LATHE_LEAD_SCREW_V3.0_OP3)
(DATE=DD-MM-YY - 04-08-21 TIME=HH:MM - 21:48)
(MCAM FILE - M:\DOCUMENTS\DENNIS\SOLIDWORKS PROJECTS\LATHE_LEAD_SCREW_V3.0.SLDPRT)
(NC FILE - D:\DOCUMENTS\MY MASTERCAM 2022\MASTERCAM FOR SOLIDWORKS\LATHE\NC\LATHE_LEAD_SCREW_V3.0_OP3.NC)
(MATERIAL - STEEL INCH - 1030 - 200 BHN)
G20
(TOOL - 3 OFFSET - 3)
(TOOL 3  INSERT - DCMT32.51)
G28 U0. W0.
G50 X1. Z-5.
G0 T0303
G97 S2500 M03
G0 X.4815 Z-5.0751
G99 G1 X.4621 Z-5.0926 F.006
X.3031 Z-5.236
Z-5.4472
G3 X.5081 Z-5.5497 R.1025
G1 X.5281 Z-5.5324
G28 U0. W0. M05
T0300
M30
%

So I found:

- how to switch to/from CSS mode

- how to control coolant

- how to get arcs to use radius mode instead of I K

Left to work out:

- how to get an M6 on the tool change (force tool change checkbox didn't do it)

- how to get rid of G28 and use a regular G0 rapid

- Why there is a T0300 at the end of the program

- How to get my safe start block prepended

Link to comment
Share on other sites
10 hours ago, RecceDG said:

Left to work out:

- how to get an M6 on the tool change (force tool change checkbox didn't do it)

- how to get rid of G28 and use a regular G0 rapid

- Why there is a T0300 at the end of the program

- How to get my safe start block prepended

Most Fanuc lathes do not require a M6 to do a tool change. When the control sees T0303 it will index to pocket 3 and call up offset 3. I have seen some Cinci lathes that used a M6 but that was a different control. Force tool change will just force the post to retract the tool again, and call up all the same start codes and speeds if you have two tool paths with the same tool number. This can be useful for checking tool wear, clearing chips or whatever you need.

The g28 line at the beginning of the program is a "return to reference point 1". The U axis is incremental for "X" and W is for "Z". Essentially, before the program starts, the post is telling the machine to go to "home" before indexing or starting movement. When the code actually calls for movement, a G0 is output, just like your posted code. 

The T3000 is there to cancel the tool offset at the end of the program. This may or may not be desirable and may be able to be changed in the post (most likely).

You can program a "safe move" with approach and retract points in your tool paths. You can also do it with "point" tool paths. I use approach/retract points when needed. 

  • Like 1
Link to comment
Share on other sites
On 8/3/2021 at 10:24 PM, RecceDG said:

OK, I'm looking everywhere in Mastercam for Solidworks 2022 and I can't find "Align to Z" anywhere.

lathe_planes.png

 

Where is it hiding?

 

Placeholder: This is the GCode the final finishing pass generated when I posted it. I'm going to analyze it later. Pay no attention just yet.


%
O0000
(PROGRAM NAME - LATHE_LEAD_SCREW_V3.0_OP3)
(DATE=DD-MM-YY - 03-08-21 TIME=HH:MM - 23:13)
(MCAM FILE - M:\DOCUMENTS\DENNIS\SOLIDWORKS PROJECTS\LATHE_LEAD_SCREW_V3.0.SLDPRT)
(NC FILE - D:\DOCUMENTS\MY MASTERCAM 2022\MASTERCAM FOR SOLIDWORKS\LATHE\NC\LATHE_LEAD_SCREW_V3.0_OP3.NC)
(MATERIAL - STEEL INCH - 1030 - 200 BHN)
G20
(TOOL - 3 OFFSET - 3)
(TOOL 3  INSERT - DCMT32.51)
G28 U0. W0.
G50 X1. Z-5.
G0 T0303
G97 S1587 M03
G0 X.4815 Z-5.0751 M8
G50 S2800
G96 S200
G99 G1 X.4621 Z-5.0926 F.006
X.3031 Z-5.236
Z-5.4472
G3 X.5081 Z-5.5497 I.1025
G1 X.5281 Z-5.5324
G28 U0. W0. M05
T0300
M30
%

 

Me neither!

Good catch ... I've got to talk to the team about that one.

Thanks

Link to comment
Share on other sites

Ha!

Misc Integer 1 set to 1 fixed the G28 stuff, and some post processor tweaks fixed the rest.

Voila!

%
O0000
(PROGRAM NAME - LATHE_LEAD_SCREW_V3.0_OP3)
(DATE=DD-MM-YY - 05-08-21 TIME=HH:MM - 22:01)
(MCAM FILE - M:\DOCUMENTS\DENNIS\SOLIDWORKS PROJECTS\LATHE_LEAD_SCREW_V3.0.SLDPRT)
(NC FILE - D:\DOCUMENTS\MY MASTERCAM 2022\MASTERCAM FOR SOLIDWORKS\LATHE\NC\LATHE_LEAD_SCREW_V3.0_OP3.NC)
(MATERIAL - STEEL INCH - 1030 - 200 BHN)
G20
G0 G54 G17 G40 G80
(TOOL - 3 OFFSET - 3)
(TOOL 3 INSERT - DCMT32.51)
G0 X1. Z-5.
T0303 M6
G97 S2500 M03
G0 X.4815 Z-5.0751
G99 G1 X.4621 Z-5.0926 F.006
X.3031 Z-5.236
Z-5.4472
G3 X.5081 Z-5.5497 R.1025
G1 X.5281 Z-5.5324
G0 X1. Z-5.
M05
M30
%

 

  • Like 2
Link to comment
Share on other sites

When programing a 2x lathe you always want the part on the Top plane, with the center sitting on X0 Y0 and the end on Z0(preferably).  If you need to program the back side there a command for that(stock flip).  Also, if you're programing a lathe with a bottom turret you need to configure the tools for that as well.  The default Fanuc post will work with a bottom turret lathe, its what we have at work, just need to configure the tools.

THE G28 problem... Yeah, I just edit out the G28 and add exit moves(G00 X6., G00Z6.)  Something else to consider, always, always, and I mean ALWAYS set up your stock on Lathe, otherwise you WILL crash, specially drills and boring bars.(ask me how I know)

I'm not understanding what problem you're having though.

Its not that difficult once you wrap your head around it

Link to comment
Share on other sites

So why is THIS happening?

I drew up a part with a bunch of curves so I could test my post for G2/G3 correctness, but I can't get the chain to follow the outside profile of the part. No matter how I select the faces, the chain cuts inside the "tires" on this shape, instead of going around the outside.

The Solidworks geometry is just a revolved sketch.

inside_chain.png

Link to comment
Share on other sites

The machine definition is left spindle, lower turret. Stock setup and chuck jaws setup worked fine right from the hop. Lacking "Align to Z" I rotated the Solidworks view around to orient the world X and Z axis in the right direction and created the sketch on that plane, which worked for setting up the stock.

A facing cut works as expected - tool comes in the right way, oriented correctly, and stops at the rightmost edge of the model.

Maybe this is plane related - I didn't touch anything in planes manager; I'll check that and see what it is currently set to.

Link to comment
Share on other sites

Screengrab of planes manager. I mucked around setting various planes to WCS and T with the "=" button, but none of them fixed that chain.

Then I tried a groove operation, selecting the faces between the "tires" - so the big turn flat, the two fillets on each side of it, and the little tiny facing flat as the groove blends into the "tires" - and that worked!

So then I did a second groove op, this time on the "axle" and the "bell" radius, and it kinda worked, in that it correctly cut the "axle" and "bell", but to do so it plunged straight through the "tire".

It's like it doesn't see that part of the model - like the "tire" doesn't exist.

lathe_planes_2.png

groove_ok.png

groove_notok.png

Link to comment
Share on other sites

That is lower left turret land. What makes you think it is upper?

 

For fun, I created a new part. Same process - rotate Solidworks view around until Z and X point the right way, draw a sketch in this view, revolve it, but this time, no undercuts.

And "Lathe rough" worked.

The toolpath is a little janky because I was trying to force a tool in that doesn't fit... the point is though that the toolpath creation is clearly recognizing the model geometry and is doing the right thing.

So either the problem is with the undercuts, or there's something wonky with the geometry of the model itself.

 

 

 

but_this_works.png

Link to comment
Share on other sites
On 8/11/2021 at 7:25 PM, RecceDG said:

So why is THIS happening?

I drew up a part with a bunch of curves so I could test my post for G2/G3 correctness, but I can't get the chain to follow the outside profile of the part. No matter how I select the faces, the chain cuts inside the "tires" on this shape, instead of going around the outside.

The Solidworks geometry is just a revolved sketch.

inside_chain.png

Have you tried right clicking the chain in the chain manager and selecting "change sides"

  • Like 1
Link to comment
Share on other sites
13 hours ago, RecceDG said:

That is lower left turret land. What makes you think it is upper?

 

For fun, I created a new part. Same process - rotate Solidworks view around until Z and X point the right way, draw a sketch in this view, revolve it, but this time, no undercuts.

And "Lathe rough" worked.

The toolpath is a little janky because I was trying to force a tool in that doesn't fit... the point is though that the toolpath creation is clearly recognizing the model geometry and is doing the right thing.

So either the problem is with the undercuts, or there's something wonky with the geometry of the model itself.

 

 

 

but_this_works.png

I guess in all that reading I missed your machine is a lower left configuration verse a upper left. Then the direction is correct just need to sort out the side issue on the chaining and should be good to go. It would take me 5-10 minutes to toolpath in Regular Mastercam Lathe and not matter if it is Lower Left, Upper Left, Upper Right or Lower right. That does have mt thinking have you checked your tools and made sure they are configured correctly for that axis combination. I have found in teaching customers Lathe with a non standard upper left axis combination that they miss making sure the tool is setup correctly for the axis combination they are programming for. Are you confident you have got the tool configured correctly for the lower left axis combination?

Link to comment
Share on other sites
6 hours ago, crazy^millman said:

 Are you confident you have got the tool configured correctly for the lower left axis combination? 

Yup - because if I limit the selection to anything else except the "tires", the toolpath works.

There is something specific to that geometry that Mastercam doesn't like, but (at this point) I don't know if it is an error in the Solidworks geometry that is making Mastercam (rightfully) barf, or if it something in Mastercam having trouble with legit geometry. And that could be a PEBCAK problem due to my unfamiliarity with MC, or it could be a legit bug.

I also found something else related to a tool collision not being detected, but one step at a time.

Link to comment
Share on other sites

This is a good thread and it reminds me of writing mastercam programs for our 2 axis Prototrak lathes. It took me a good while to get all the issues hammered out. We still havent found a good post that eliminates hand editing yet. For ex, i had a drilling op that I programmed. Had to go in there and dick around and actually change what cycle it runs on the drill op because it freaked out over G73 for whatever reason.

Some of the fun (and hair pulling) in this game is hunting down these gremlins when they pop up. And it is never fun when you need to do something like figure out a post issue when you need production up and running on the parts.

 

I want to throw in my tidbit of guidance - I have given up completely on MCfSW in my applications. And I am in the education field, so I am always trying to find the EASIEST CAM transition for brand new students. Granted it has been a handful of years since I switched back to teaching standalone mastercam, but I was having crashing issues, licensing issues, posting issues, and general lack of 100% of the features that I am used to in Mcam standalone. Never fun when half your class crashes the software after an hour of putting in the toolpathing work! There are a handful of important functions that just don't exist or function in a different manner. I have realized that Mastercam is really good at what it does - Driving toolpaths. Solidworks is really good at what it does - Creating CAD data. In my limited experience (6 yrs teaching) I have found standalone Mastercam is just better at driving toolpaths IMO, but your mileage may vary.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...