Sign in to follow this  
Leon82

Is it possible to change the letter for position in a certain drill cycle?

Recommended Posts

In a certain probe (drill) cycle I need I & J output for x and y position, respectively.

Currently I use misc drill parameters. 

I and j are the x y points for a z measurement.

The problem is if you want to chain a large amount of points you have to edit those two parameters for each point.whereas if I can get it to just output the point position it with I and j it would save a lot of time.

 

I played around quick and it gave me a duplicate format statement error.

 

Share this post


Link to post
Share on other sites

Typically I create a global alias for the variable and format it, but you can also use the new address function nwadrs( ); just remember to set the format back after output.

 

  • Like 1

Share this post


Link to post
Share on other sites

Can you tie a condition to mi$, mr$, canned text, a drill parameter or custom drill parameters?

Edit: Nevermind, I missed that or already doing that. Try adding a condition that will reinitialize it until your done with the probing.  I'm done for the weekend and I don't have my post at home.

Try searching here for pmachine and you will see a different example but it will show the process.

  • Like 1

Share this post


Link to post
Share on other sites

I can use the p common drill b post block to set it .

 

there's actually an example in there I can follow so maybe I'll try that when I get some time.

Share this post


Link to post
Share on other sites

You can use the 'nwadrs' function to assign a different 'prefix' character to any variable output.

     result = nwadrs(xabs, "I")
     result = nwadrs(yabs, "J")

But you have to remember to set them back to the original prefix, after you have finished the output. (I would do this in 'pcanceldc$' Post Block.)

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, Colin Gilchrist said:

You can use the 'nwadrs' function to assign a different 'prefix' character to any variable output.

     result = nwadrs(xabs, "I")
     result = nwadrs(yabs, "J")

But you have to remember to set them back to the original prefix, after you have finished the output. (I would do this in 'pcanceldc$' Post Block.)

Awesome thank you!

  • Like 1

Share this post


Link to post
Share on other sites

It worked, but I had to put it like this to prevent it from yelling at me when I posted it

result = nwadrs( "I", xabs)
  • Like 1

Share this post


Link to post
Share on other sites
On 2/12/2020 at 12:29 PM, Leon82 said:

It worked, but I had to put it like this to prevent it from yelling at me when I posted it

result = nwadrs( "I", xabs)

Yes, getting the parameter order correct helps. I was going from memory...

  • Like 1
  • Haha 1

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