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:

Adding sub-program prefix "N"


Recommended Posts

Hey guys, my MPMaster is outputting sub-program numbers with no letter, but my Haas likes N. Where in the Post do I change this?

 

Here?

 

psub_call_s$	 #Call to sub level
 result = nwadrs(strp, sub_prg_no$)
 sub_prg_no$ = sub_prg_no$ + 1000 #Add sub number offset
 #if progno$ = sub_prg_no$, result = mprint(sprgnerror)
 pbld, n$, "M97", *sub_prg_no$, e$

 

 

 

O1111( PJ04112013-1 )
( T1 | LTR. K DRILL | H1 | DIA: .281 )
G20
G0 G17 G40 G49 G80 G90
G91 G28 Z0 ( DRILL .281 HOLES 4X )
T1 M6 ( LTR. K DRILL | T: 1 | D: 1 | H: 1 | DIA: .281 )
G0 G90 G54 X-2.003 Y-1. S1631 M3
G43 H1 Z.1
/M8
G99 G81 Z-.3282 R.1 F8.155
M97 P1001
G80
M9
M5
G91 G28 Z0.
G0 G90 G154 P99 X0. Y0.
T1 M6
M30

O1001 <-------------------Should be N1001
G91
Y2.
X-4.25
Y-2.
M99
%

 

 

TIA!

Link to comment
Share on other sites

Hey guys, my MPMaster is outputting sub-program numbers with no letter, but my Haas likes N. Where in the Post do I change this?

 

Here?

 

psub_call_s$	 #Call to sub level
 result = nwadrs(strp, sub_prg_no$)

 

 

The problem is that the address for 'sub_prg_no$' is being reassigned here. It may also be reassigned at other locations as well. Search your post for every occurrence of 'sub_prg_no$'. The best way to correct this is to remove the reassignment line(s) or comment them out like this:

 

psub_call_s$	 #Call to sub level
# result = nwadrs(strp, sub_prg_no$)

 

This way the fix that I recommended above will stick.

Link to comment
Share on other sites
  • 4 months later...

psub_call_s$ #Call to sub level

result = nwadrs(strp, sub_prg_no$)

sub_prg_no$ = sub_prg_no$ + 1000 #Add sub number offset

pbld, n$, "M97", *sub_prg_no$, e$

 

psub_st_s$ #Header in sub leveln

result = nwadrs(strn, sub_prg_no$) <------------------ solo tienes que cambiar la "O" por la "N"

" ", e$

*sub_prg_no$, e$

pbld, n$, sgabsinc, e$

 

psub_end_s$ #End in sub level

n$, "M99", e$

prv_absinc$ = -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...