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:

multi pass / depth cuts with subout


Rob_Bish
 Share

Recommended Posts

I'm altering a 5axis post to use subouts. All was going well until I used multi cuts/depth cuts. Instead of it all being in one sub im outputting one sub for each pass. Could someboby point me in a direction of an If Else to eliminate this.

 

Thanks Rob

 

G0 G90 G55 A0. B0.

M10 M70

M92

M98 P2301

M98 P2302

M98 P2303

M98 P2304

M09

G0 G28 G91 Z0.

M80

M01

 

 

end of O2301

G0 Z.25 prapid$ prapidout 2106.

G0 X-.7043 Y-1.8656 prapid$ prapidout 2108.

G17 ptlchg0$ ptlchg0$ 2156.

M99 ptlchg0$ ptlchg0$ 2156.

% ptlchg0$ ptlchg0$ 2156.

 

% ptlchg0$ ptlchg0$ 2156.

O2302 ( TEMP ) ptlchg0$ ptlchg0$ 2156.

G0 Z.1 ptlchg0$ prapidout 2156.

G1 Z0. plin$ plinout 2158.

Y-1.9443 F.01

Link to comment
Share on other sites

This is still in a rough stage.

 

 

Post Name : Generic Fanuc 5X Mill

 

ptlchg0$ #Call from NCI null tool change (tool number repeats)

#Cancel check in case missed in ptoolend

if prv_n_tpln_mch <> n_tpln_mch, pg69

##### Custom changes allowed below #####

if use_clamp & cuttype <> zero, ###added unclamp

[ p_lock = zero

s_lock = zero

pbld, n$, s_slock,

pbld, n$, s_plock, e$ ]

pcomment$

subout$ = 0

prognosub1=prv_prognosub1 + 1

prognosub2=prognosub1

prv_prognosub1=prognosub1

!prognosub1

subout$ = 3

"G17", e$

"M99", e$

"%" , e$

" " , e$

" " , e$

" " , e$

"%" , e$

*prognosub2, "(", spartn, ")", e$

comment$ , e$

subout$ = 3

# This call to 'pcan' has been commented out to avoid

# double output of canned text

#pcan

pbld, , sgplane, e$

pspindchng

##### Stop custom changes #####

psof_tlchg_blck #Start position block

#Save the current brk_ in prv_brk_ for next loop

pupd_brk

toolchng = zero

##### Custom changes allowed below #####

if use_clamp & not(opcode$ = three | cuttype <> zero),

[

p_lock = one

s_lock = one

pbld, , s_slock,

pbld, , s_plock, e$

]

subout$ = 0

"M98", *prognosub1, e$ #comment$,

subout$ = 3

##### Stop custom changes #####

ptlch_ret_app

Link to comment
Share on other sites

Well I have understood that the post you are using does not support subs and something in the PSB will give you trouble in your attempt without being able to unlock the PSB and guess what that is never going to happen. I thorw it out there in the hope it will get you some good ideas on how to approach it.

 

HTH

Link to comment
Share on other sites

Sorted my problem i moved the below to ppos_cax_lin and with a little moving around now getting the output I want.

 

 

subout$ = 0

prognosub1=prv_prognosub1 + 1

prognosub2=prognosub1

prv_prognosub1=prognosub1

!prognosub1

subout$ = 3

"G17", e$

"M99", e$

"%" , e$

" " , e$

" " , e$

" " , e$

"%" , e$

*prognosub2, "(", spartn, ")", e$

comment$ , e$

subout$ = 3

....

.....

....

 

subout$ = 0

"M98", *prognosub1, e$ #comment$,

subout$ = 3

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