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:

Comments in Sub Prog


Newbeeee™
 Share

Recommended Posts

Hi All,

Original post mpfan.

 

I'm trying to output the 'comment box' for sub programs.

Iv'e got it to automatically output the main prog no, and the tool name, but the comment box is beating me.

All I get is brackets, and nothing else, as below.

 

O0020 ( SUB FOR PROG NO O0999 )

( 8MM DIA CARBIDE SLOTDRILL )

( )

 

G1 G91

G41 D2 X5. F1400.

 

 

The part of the post I'm working on is here, any help greatfully appreciated.

 

psub_st_s$ #Header in sub leveln

result = nwadrs(stro, sub_prg_no$)

" ", e$

*sub_prg_no$, "( SUB FOR PROG NO"*progno$,")"e$

ptoolcomment

*pcomment2 (THIS SHOULD ADD INFO FROM COMMENTS BOX BUT DOESNT FOR SOME REASON)

" ",e$

pbld,"G1"sgabsinc, e$

 

 

Many thanks,

Terry

Link to comment
Share on other sites
Guest CNC Apps Guy 1

Change to this;

code:

psub_st_s$ #Header in sub leveln

result = nwadrs(stro, sub_prg_no$)

" ", e$

*sub_prg_no$, "( SUB FOR PROG NO", *progno$, " )", e$ # added commas in correct locations

ptoolcomment, e$

pcomment$, e$ #You should call the postblock that calls pcomment2 - also you should not force a postblock call. Iy's going there anyway

" ",e$

.....

If you need output corrected, look at pcomment2 and modify your output there.

 

HTH

Link to comment
Share on other sites

Thanks for the reply.

 

I have corrected all as you showed (commas etc) and it just posts brackets.

I have looked at the pcomment block, as you said.

I then read chapter 19 of the v9 post guide twice, and my head now hurts.....

 

I will read again later, and try to understand more.

 

What I can't comprehend is that the toolchange block (ptlchg$) calls 'ptoolcomment', followed by 'comment$'.

This posts as tool description followed by the elusive manual entry comment, and works fine for the toolchange.

 

To get the required info to post in the sub program, my logic was to copy the info from ptlchg$ and add it to the sub.

The 'ptoolcomment' worked straight away, so why didn't the 'comment$'???

 

Am I missing something?

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