ch3no2freak

mastercam 9.1 w/ GRBL

Recommended Posts

So I converted my bench top mill to cnc and I got everything working. Heres the issue, I have mastercam 9.1 but cant find the post to make it work with GRBL. I downloaded fusion 360 and that works but I know how to use mastercam 9.1 pretty damn well and not so much the fusion software. I also have many many MANY files already written in mastercam from years ago that I would rather not have to redo in fusion. Does anyone anywhere know where I can find the post to make this work? The re-seller has nothing for me, and master cam corporate couldn't help. Yes I know 9.1 is pretty old, however it still work pretty well for me. Thanks for any help any can offer.

Share this post


Link to post
Share on other sites

 The GitHub makes it seem like a Fanuc post with a few tweaks would do the trick, do you have a Fanuc post you could try?

List of Supported G-Codes in Grbl v0.9 Master:
  - Non-Modal Commands: G4, G10L2, G10L20, G28, G30, G28.1, G30.1, G53, G92, G92.1
  - Motion Modes: G0, G1, G2, G3, G38.2, G38.3, G38.4, G38.5, G80
  - Feed Rate Modes: G93, G94
  - Unit Modes: G20, G21
  - Distance Modes: G90, G91
  - Arc IJK Distance Modes: G91.1
  - Plane Select Modes: G17, G18, G19
  - Tool Length Offset Modes: G43.1, G49
  - Cutter Compensation Modes: G40
  - Coordinate System Modes: G54, G55, G56, G57, G58, G59
  - Control Modes: G61
  - Program Flow: M0, M1, M2, M30*
  - Coolant Control: M7*, M8, M9
  - Spindle Control: M3, M4, M5
  - Valid Non-Command Words: F, I, J, K, L, N, P, R, S, T, X, Y, Z
  • Thanks 1

Share this post


Link to post
Share on other sites

too be completely honest with you, I'm not 100% sure what that means. Could you educate me slightly?

Share this post


Link to post
Share on other sites

I don't go back to 9.1 but if it has a generic fanuc post it will work with very minor tweaks for GRBL.  In fact, I imagine the generic fanuc would straight run with no edits.

  • Thanks 1

Share this post


Link to post
Share on other sites

What Post Processors do you already have for V9.1?

Look in your Post Folder:

Install\mill\posts

(Install should be something like "mcam9", or something like that.)

Jeff's comment about GitHub, refers to a website which hosts "online open-source software code". He looked on Github to see if there were resources available for your controller, and saw that the G-codes for the GRBL are very similar to the Fanuc control. 

So, the first step is to search through your Mastercam installation for a file called 'MPFan.pst'. This is the standard "mill Post for a Fanuc 3 or 4 Axis".

Once you locate MPFAN.PST, you should make two separate backups. Copy/Paste and rename, and also make a separate backup, with a different File Extension. (Make "mpfan_backup.pst" and "mpfan.bak)

This is for safety, so if you mess up the logic, you have a way to recover.

The "Post" is just a text file, with code written in the "MP Post Language", which is a scripting language. A bit like a cross between VBScript, a Batch File (.bat), and Standard C.

The Post contains instructions, which tell MP.DLL, how to process your NCI (Toolpath data), and turn it into NC Code.

Now, create a sample Toolpath in 9.1, and Post it with the Post. Once you have NC Output happening, figure out what needs to be changed for your machine, and we can help you do that. 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

ok made the files (backup and and the other), opened mill and made a square with a simple tool path. ran the post and got this back

Untitled.png

Share this post


Link to post
Share on other sites

Dude, you've got all the answers possible on this thread.  You could pay some one to do a post.  Colin would be the goto out of the responders.

Share this post


Link to post
Share on other sites
On 2/17/2019 at 12:17 PM, Colin Gilchrist said:

What Post Processors do you already have for V9.1?

Look in your Post Folder:

Install\mill\posts

(Install should be something like "mcam9", or something like that.)

Jeff's comment about GitHub, refers to a website which hosts "online open-source software code". He looked on Github to see if there were resources available for your controller, and saw that the G-codes for the GRBL are very similar to the Fanuc control. 

So, the first step is to search through your Mastercam installation for a file called 'MPFan.pst'. This is the standard "mill Post for a Fanuc 3 or 4 Axis".

Once you locate MPFAN.PST, you should make two separate backups. Copy/Paste and rename, and also make a separate backup, with a different File Extension. (Make "mpfan_backup.pst" and "mpfan.bak)

This is for safety, so if you mess up the logic, you have a way to recover.

The "Post" is just a text file, with code written in the "MP Post Language", which is a scripting language. A bit like a cross between VBScript, a Batch File (.bat), and Standard C.

The Post contains instructions, which tell MP.DLL, how to process your NCI (Toolpath data), and turn it into NC Code.

Now, create a sample Toolpath in 9.1, and Post it with the Post. Once you have NC Output happening, figure out what needs to be changed for your machine, and we can help you do that. 

 

M5
G91 G28 Z0.
G28 X0. Y0. A0.
M01
( UNDEFINED   TOOL - 1  DIA. OFF. - 1  LEN. - 1  DIA. - .25 )
T1 M6
G0 G90 G53 X-1. Y.5 A0. S5000 M3

G43 H1 Z.51
G1 Z.23 F50.
X1. F350.
Y-.5
X-1.
Y.5
Z.49 F300.
M5
G91 G0 G28 Z0.
G28 X0. Y0. A0.
M30
%
 

this is what i got back after using a different fanuc post I got from mastercam. However ugcs kicks back errors saying a few lines are unsupported. the high lighted stuff is what it didnt like

Share this post


Link to post
Share on other sites

So, I'm guessing it's the A0. on two of the lines.  The M01 and then toolchange format.

Figure out what it will eat then post that and a zip file.  Some one will help you but needs a zip file to help.

  • Thanks 1

Share this post


Link to post
Share on other sites

I was able to disable the a axis, I cant quite figure out how to disable the tool changer. also it kjeeps telling me that axis is missing from G0 and G28 MPFAN.zip

Share this post


Link to post
Share on other sites

I think the best way to disable the tool change is to use the auxiliary file stream and generate a new file for each tool.  I have an example of this but I'm not sure if it will work in V9.

If I have time tonight I'll flash grbl and see if I can get out put that works.

  • Thanks 1

Share this post


Link to post
Share on other sites

The below ran on grbl 1.1.  I think you'll need a G49 to cancel the G43.1, but I'm only hooked up to the board so I can't tell too much

G0 G53 Z0.
M01
G0 G90 G54 X-1. Y.5 S5000 M3
G43.1 Z.51
G1 Z.23 F50.
X1. F350.
Y-.5
X-1.
Y.5
Z.49 F300.
M5
G0 G53 Z0.
G0 G53 X0. Y0.
M30
%

I

  • Thanks 1

Share this post


Link to post
Share on other sites

after seeing what you posted, and then messing with the post i have I think i finally have it all figured out except for one thing. everything works except for some reason after I set 0 on my machine and send the file, it retracts the tool like 2 1/2" and then starts initiating the file. I thought maybe it was in the way I set the toolpath up but I verified everything is correct to the way I used to set it all up. So I guess with a little more tweaking I will have this all set up correctly. you guys have any idea why its doing that? probably a stretch but I figured I would ask none the less

Share this post


Link to post
Share on other sites

That is most likely just the machine reading this line:

G0 G53 Z0.

Which tells the machine to go to the Z axis '"0" position in absolute machine coordinates...

HTH

Share this post


Link to post
Share on other sites
1 hour ago, Flole said:

@ch3no2freak Could you please share your GRBL Post-Processor with me?

I can post when i get home man but honestly it's just the fanuc post from master cam and i disabled the a axis and i delete the tool change code and the m codes after i post it. That did the trick

Share this post


Link to post
Share on other sites

I just got a new to me 2000 vf2 I'm using the generic mpfan post and it works I did have to edit to remove the A axis I figured that out

but it outputs a G92 code and I don't know how to edit that out as it shows in the questions that it is set to number 2

Can someone help me pls thanks so much . I have to manually edit at machine as of now to get rid of .

 

Share this post


Link to post
Share on other sites
17 minutes ago, progaseng said:

I just got a new to me 2000 vf2 I'm using the generic mpfan post and it works I did have to edit to remove the A axis I figured that out

but it outputs a G92 code and I don't know how to edit that out as it shows in the questions that it is set to number 2

Can someone help me pls thanks so much . I have to manually edit at machine as of now to get rid of .

 

Check the misc integers.

You may need to set your control definition misc values as there is usually a switch on 1 or 2

Share this post


Link to post
Share on other sites

301. Work Coordinates [0-1=G92, 2=G54's] (mi1)? 2
302. Absolute or Incremental [0=ABS, 1=INC] (mi2)? 0
303. Reference Return [0=G28, 1=G30] (mi3)? 0
304. Default miscellaneous integer variable 4 (mi4)? 0
305. Default miscellaneous integer variable 5 (mi5)? 0
306. Default miscellaneous integer variable 6 (mi6)? 0
307. Default miscellaneous integer variable 7 (mi7)? 0
308. Default miscellaneous integer variable 8 (mi8)? 0
309. Default miscellaneous integer variable 9 (mi9)? 0
310. Default miscellaneous integer variable 10 (mi10)? 0

It looks like it was set on number 2 I know the mills home position isn't in the center of table it's x and y in the furthest most end of travels in both in the Positive direction  so any advice on what I need to change to make the haas vf2 work again thx for the help . I want it to not use the g92 but it comes up in the program yet when looking here it should be turned off but I'm not the smartest when it comes to this stuff . I was able to turn the A axis off

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 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