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 Variable


George_Gerhard
 Share

Recommended Posts

Is there a variable available that records the last Y axis position? Example if the code reads

G00 X10. Y10. I want to capture this Y value. I am doing some work with a compound angle aggregate attachment, and I need my code to say G18G44H01Y10. This is an 8 axis Fanuc 160Imb control with axis swap, and when I swap axes and work planes I need a redundant Y command. If the variable name was YPOS, I would edit my post to say pbld,n, YPOS, e

Any ideas

Link to comment
Share on other sites

"prv_" before any varabile is supposed to store any previous value (ie) prv_yinc or prv_yabs. Does not always work and you never know is it is the value you want. You don't need to define this varb.

The best is to define your own varb (ie) last_y and capture it at the correct post block such as pfyout or pyout. The correct post block to capture the y value at the correct time is what you need to play with.

Link to comment
Share on other sites

quote:

Does not always work and you never know is it is the value you want


I beg it differ - it always works and you do know what the value in the 'prv' variable is.

 

A 'prv_[varname]' is automatically created by MP for every numeric variable.

 

The prv_[varname] variable is always loaded with the value of the [varname] variable every time the value in [varname] is output to the NC file, or you can explicitly force this update from the value in [varname] to prv_[varname] by using the '!' prefix.

 

Example:

!xabs, *yabs

 

Would copy the current value in 'xabs' into 'prv_xabs'. Note that using the '!' this update occurs WITHOUT any output being written to the NC file.

 

'prv_yabs' would also get loaded from 'yabs' in this example because it's value was FORCED to output to the NC using the '*' prefix.

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