Sign in to follow this  
SlaveCam

Getting transform op's work offset number

Recommended Posts

Why is this not working?  All I get is -99999, also test = opinfo(15332, 0) will yield the same result.

 

     if op_id$ <> xform_op_id$, #Inside transform?
      [
       test = opinfo(15332, 0, 0010)
       *test, e$              
      ]

image.png.0544d0502ae310aa2ab56ca46da3b267.png

EDIT: Actually param 15332 is work offset numbering type, but that's what I am trying to get, despite misleading topic.

EDIT2: I don't get it. Now it mysteriously started to work, despite code being exactly the same, and operations being exactly identical. Is it possible that Mastercam fails to reload the modified/updated post processor file into memory for some reason (it is on network drive) which can cause glitches?!

Share this post


Link to post
Share on other sites

Did you copy and paste that code from your editor?  If so you have some extra junk after the 15332, see below.

image.png.08e4e5c0b1548e431ec91fa60565cfce.png

image.png.7a8d5da2b63585e3608ee94ecdfe5cff.png

 

Once I removed the extra characters everything worked as expected.

 

  • Like 1

Share this post


Link to post
Share on other sites

Yes I did. That was observant! And that explains everything. AND, this is a recipe for disaster. If Mastercam Code Expert messes with my post with invisible junk, crashes are bound to occur.

Share this post


Link to post
Share on other sites
On 4/15/2019 at 9:06 AM, SlaveCam said:

Why is this not working?  All I get is -99999, also test = opinfo(15332, 0) will yield the same result.

 

     if op_id$ <> xform_op_id$, #Inside transform?
      [
       test = opinfo(15332, 0, 0010)
       *test, e$              
      ]

image.png.0544d0502ae310aa2ab56ca46da3b267.png

EDIT: Actually param 15332 is work offset numbering type, but that's what I am trying to get, despite misleading topic.

EDIT2: I don't get it. Now it mysteriously started to work, despite code being exactly the same, and operations being exactly identical. Is it possible that Mastercam fails to reload the modified/updated post processor file into memory for some reason (it is on network drive) which can cause glitches?!

I'm curious. Were you trying to get your post to put out a G57?

Share this post


Link to post
Share on other sites

Slavecam,

Also, for Transform Ops, check your Control Definition File. There is a setting to output:

  • Operation's Parameters
  • Transform's Parameters
  • Both Op and Transform Params.

Typically, I always use the "Both" option...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • 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