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:

Post - pscomm0 and scomm0 ??


Chad 73
 Share

Recommended Posts

Help i couldn't find enough documentation to check these out. I am trying to read the operation comment and output some code depending on a certain condition. I was using scomm but it seems when i refer to it, it outputs to the post and wipes out scomm. currently i was using

 

pcomment

test = scan (str1, scomm)

 

to capture a number after a cerain string. The problem it outputs the string when doing this and the string didn't get put inside of paranthesis for the control. How can i stop the processing of scomm or does anyone have a example i can look at for scomm0?

 

Thanks

Link to comment
Share on other sites

Chad,

 

If you access scomm from within the pcomment postblock, what you describe will happen.

Note in Jimmy's example that the only command in the (pre-defined) pcomment postblock would be to call a (user-defined) pcomment2 postblock, where the 'capture' of the data in scomm occurs.

 

I'm trying to understand exactly what you are wanting to do...

Read the 'comment' (and do something based on that comment), but not actually output that comment string to the NC file?

Link to comment
Share on other sites

Roger has my idea. i do want to output code base on the text held within scomm. I can output the comment but the comment was being output without paranthesis. I did find a work around using a pcomment2 postblock and resetting scomm:

 

pcomment # Comments

pcomment2

toolcommno = scan (str1, scomm_holder)

 

pcomment2 # secondary created to read scomm

scomm = str4 + scomm + str5

scomm_holder = scomm

 

str4 & 5 are = open and close paranthesis

From there i used scan to search for the string i want and capture the following number. Thanks for the help!!

 

 

cheers.gifcheers.gifcheers.gifcheers.gifcheers.gif

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