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:

Capturing and isolating a POCO value return


Recommended Posts

I'm working on capturing the sub spindle grip position during the POCO operation. I'm using the 'stream_tool_op' function to get it. The problem is that the return has several different values as the tool op changes a few times during the operation. My question is, is there a way to isolate just one of the values returned? This is the code I'm using to grab the value

screenshot1.jpg.2beff3e2cdbfc62a3f45b46f105d667a.jpg

And here are the returns that are posting. The third and fourth instances contain the value I'm trying to store.

1202585842_screenshot2.jpg.102695bf0570f8e03b9f5f5282e8f3d8.jpg

Link to comment
Share on other sites

'stream_tool_op' is a new function within the MP Language. MP has been greatly enhanced over the last 10 years or so, to include new ways of sorting and filtering through the data that Mastercam outputs to the Post, and stores within it's NCI Operations.

Having never used 'stream_tool_op', I can't offer a direct method yet, but what I can tell you is that I've been building Posts a long time, and there is generally a way to do almost anything within a MP Post, given enough time and persistence.

When I approach a Post problem like this, I generally try and think to myself something like the following:

  • I'm only using the 'opinfo' function with parameter 13212, once we've detected that 'stream_tool_op = 217'.
  • What other 'parameter number' could I query, that would give me a "unique" value, that would separate it from the other 'stream_tool_op = 217' returns.
  • There are 8 separate numbers being returned in a list. What do those other numbers represent? Are they numbers from 'other components in the axis combination'?
  • Say you find a Parameter (NOTE: This is an non-working example only!), let's make one up for the example, and call it '55555', that has a unique value for when "sub_pickoff_pos = -.95". Say we run a 2nd list for parameter '55555', and it returns the following:
> fake_prm_55555 = 1
> fake_prm_55555 = 2
> fake_prm_55555 = 2
> fake_prm_55555 = 9
> fake_prm_55555 = 16
> fake_prm_55555 = 12
> fake_prm_55555 = 18
> fake_prm_55555 = 27
  • I could then reasonably conclude that if I include another 'opinfo' function on that parameter, and it returns a value of '2', that I would want to capture that 'sub_pickoff_pos' value, and only when that return is '2'. If the return is '1', or '9', or any other number, then we never enter into the next level of the subroutine.

Hopefully that gives you some ideas to try. I know you're new to the MP Language. Have you gone through my class videos on YouTube yet?

  • Like 2
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...