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:

How to edit post processors


bichlan
 Share

Recommended Posts

Hi i am a new guy here and also new @ MasterCam .at work we use MC X3 and Haas X4 post processor but I don't know how to make it post NC file,use M97 (subroutine).because some of machine in our shop is old and very limited at memory.here is a sample program that I like to be done in MasterCam.

THANKS !!!

 

O00001

T2 M6

G00 G90 G54 X.3121 Y-.8548 S2000 M03

G43 H02 Z1.M88

G01Z.0 F100.

M97 P10 L40

G00 G90 Z1. M89

G91 G28 Z0.

G28 Y0.

M30

 

 

N10

G01 G91 Z-.025 F50.

G3 X.6396 Y.4647 I-.4543 J1.2978 F150.

G1 X-.3626 Y.3475

X-.2821 Y.0917

G2 X-.2134 Y-.155 I-.4492 J.3939

G1 Y-.2967

X.2185 Y-.4522

M99

  • Like 1
Link to comment
Share on other sites

I'm not sure you need to edit your post for a Haas mill.

 

A transform operation will post out M98 Pxxxx for you, and name the sub with an Oxxxx.

 

Pocketing depth cuts and redundant drill points can be output as subs as well. Check the subprogram box in depth cuts for pocketing or in linking parameters for drilling operations.

 

If your Haas only supports M97 line jumps like you posted, you will have to do more work to that post.

 

[ 11-22-2009, 11:20 AM: Message edited by: Mastercam Guru ]

Link to comment
Share on other sites

The fine thing with the Haas controllers using M97 instead of M98 is that the sub routines are in the same program after the M30. You do not have to save and name a whole bunch of programs as it is one continuous program. As far as the Haas reading an M98 I could be wrong but I have not seen one yet that won't.

Link to comment
Share on other sites

Well I did try replace M98 by M97 but still post M98 in NC file.

and my oldest mill is 1999 VF5.yes if I use M98 the program is too long compare with M97,here sample (this program I only loop 10 times)

I am realy appreciate for all replyer and we together find out better way.Thanks

%

O00002

T2 M6

G0 G90 G54 X.4543 Y-1.2978 S2139 M3

G43 H02 Z2.

Z.1

G1 Z-.025 F6.4

M98 P1001

G90 Z-.05

M98 P1001

G90 Z-.075

M98 P1001

G90 Z-.1

M98 P1001

G90 Z-.125

M98 P1001

G90 Z-.15

M98 P1001

G90 Z-.175

M98 P1001

G90 Z-.2

M98 P1001

G90 Z-.225

M98 P1001

G90 Z-.25

M98 P1001

G90 Z-.15

G0 Z2.

M5

G91 G28 Z0.

G28 Y0.

M30

 

O1001

G91

G3 X.6396 Y.4647 I-.4543 J1.2978

G1 X-.3626 Y.3475

X-.2821 Y.0917

G2 X-.2134 Y-.155 I-.4492 J.3939

G1 Y-.2967

X.2185 Y-.4522

M99

%

Link to comment
Share on other sites

Make sure in your machine definition you are using the post you altered. If you don,t change it it will use the original and post M98,s.

 

quote:

Find M98 and replace with M97.

I again just went and did this and it worked fine.

 

N2M01

( T2 3/8 SPOTDRILL DIA. .375 )

( SPOT HOLES )

T2M6

G0G90G55X-.703Y0.S4000M3

G43H2Z.1T3

M8

G99G82Z-.075R.1P2.F20.

M97P1001

G80

M5

G91G28Z0.M9

N3M01

( T3 NO. 9 DRILL DIA. .196 )

( SPOT HOLES )

T3M6

G0G90G55X.703Y0.S1364M3

G43H3Z.1T1

G99G83Z-.8889R.1Q.0588F4.1

M97P1002

G80

M5

G91G28Z0.

G0G53G90X-15.Y0.

M30

 

O1001

G91

X1.406

M99

 

O1002

G91

X-1.406

M99

%

Link to comment
Share on other sites

Brian - M97 looks for an "N". He'll have to change this:

 

fmt O 6 sub_prg_no$ #Program number

 

to this:

 

fmt N 6 sub_prg_no$ #Program number

 

I would advise not to use line numbering with this setup unless you are positive that the control won't try to jump to the wrong "N".

 

Some machines will simply look for the next matching N after the M97, some will look for the next matching N after the M30.

Link to comment
Share on other sites

Oops. redface.gif

 

You need to change both sub_prg_no$ and main_prg_no$. As I recall, progno$ is the main program #, main is for transform ops, sub is non-transform subs. You will also have to search for these:

 

result = nwadrs(stro, main_prg_no$)

 

result = nwadrs(stro, sub_prg_no$)

 

and change them to:

 

result = nwadrs(strn, main_prg_no$)

 

result = nwadrs(strn, sub_prg_no$)

 

They should be in psub_st_m$ and psub_st_s$.

 

 

Change these:

fmt O 6 main_prg_no$ #Program number

fmt O 6 sub_prg_no$ #Program number

 

To these:

fmt N 6 main_prg_no$ #Program number

fmt N 6 sub_prg_no$ #Program number

 

[ 11-24-2009, 01:44 PM: Message edited by: Mastercam Guru ]

Link to comment
Share on other sites

The result = nwadrs() re-assigns the formatting, I forgot those were in there.

 

 

Just tested the edits. Working fine for me. Here's a quick proggie.

G54 + G55 with subs for depth cuts.

 

 

If you can't get it working let me know.

 

code:

%

O100 (M97_SUBS_TEST.100..MP)

(REV 1)

(NOV-24-09)

(T1 - 1/2" EM)

G90 G80 G40 G17 G0 G98

G91 G28 Z0

G54

G90 X0 Y0

M1

T1 M6 ( 1/2" EM)

(MIN - Z-1.25)

G0 G90 G54 X4.9772 Y.4 S6000 M8

G91 G43 H1 Z0. M3

G92 Z.05 M8

G90

M97 P2100

(PROFILE)

G90 G55 X4.9772 Y.4 Z.05

M97 P2100

M9

G91 G28 Z0 M19

G28 Y0

G53 X-15.

(M97_SUBS_TEST.100)

M30

 

N2100 (M97_SUBS_TEST.2100..SP)

(PROFILE)

Z.01

G1 Z-.1786 F2.

M97 P1100

G90 X4.9772 Y.4

Z-.3571 F2.

M97 P1100

G90 X4.9772 Y.4

Z-.5357 F2.

M97 P1100

G90 X4.9772 Y.4

Z-.7143 F2.

M97 P1100

G90 X4.9772 Y.4

Z-.8929 F2.

M97 P1100

G90 X4.9772 Y.4

Z-1.0714 F2.

M97 P1100

G90 X4.9772 Y.4

Z-1.25 F2.

M97 P1100

G90 X4.9722 Y.4

M97 P1101

G0 G90 Z.05

(M97_SUBS_TEST.1101)

M99

 

N1100 (M97_SUBS_TEST.1100..SP)

(PROFILE)

G41 D1 Y0. F25.

Y-3.0429

G2 X4.7222 Y-3.2979 I-.255

G1 X0.

G2 X-.255 Y-3.0429 J.255

G1 Y0.

G2 X0. Y.255 I.255

G1 X4.7222

G2 X4.9772 Y0. J-.255

G1 G40 X5.3772

(M97_SUBS_TEST.1100)

M99

 

N1101 (M97_SUBS_TEST.1101..SP)

G41 D1 Y0.

Y-3.0429

G2 X4.7222 Y-3.2929 I-.25

G1 X0.

G2 X-.25 Y-3.0429 J.25

G1 Y0.

G2 X0. Y.25 I.25

G1 X4.7222

G2 X4.9722 Y0. J-.25

G1 G40 X5.3722

(M97_SUBS_TEST.1101)

M99

%

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...