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:

changing x values during posting


Recommended Posts

We have around 30 VMC so we have multiple seats of MASTERCAM mill. We have only one Lathe with "C" Axis capability so currently we do not own a Lathe version.

We occasionaly need to Live Tool a involved shape with the "C" axis on our lathe. We use our Mill software to out put the TXT so we can have the coordinate values.

We then need to double the "X" values to represent Diameter. and then change the "Y" word address to "C" word address.  The "Y" / "C" is an easy find/ replace.

Is there a way that I can alter the Post to double the "X" Values..............so I do not have to manually edit the "X".

 

Thanks for any help you can provide

  • Like 1
Link to comment
Share on other sites

This is super easy to do. Just use a global formula at the top of your post.

 

Go below the variable formatting and initializations. I'd recommend just above "pheader$". Press enter a couple times to give yourself some blank lines above 'pheader$'. Starting in the first column of your text editor, enter this global formula: "xabs = xabs * two". Enter that on a line by itself, starting in the first column. That is what "tells" MP that the formula is "Global", and not just part of an existing post block.

ptime           #Convert 24-hour time format into 12-hour AM/PM format
      if time$ >= 13, time2 = (time$ - 12)
      else, time2 = time$
      hour = int(time2), min = frac(time2)
      *hour, ":", *min,
      if time$ > 12, " PM"
      else, " AM"

#Global Formula to "double" X coordinate output value.
xabs = xabs * two

pheader$         #Call before start of file                         
      if subs_before, " ", e$ #header character is output from peof when subs are output before main
      else, "%", e$
      sav_spc = spaces$
      spaces$ = 0
Link to comment
Share on other sites

Thanks for the input:

 

Colin:

I added the into my Post.

 

xabs = xabs * two

Just before the

 

pheader$

 

When I reposted, the X values are 4X

so I experimented and found that if I used the Square Root of two ( 1.414213 ) in place of the word two

The X Values posted as DOULBLE

This of course confuses my Norwegian Logic, can anyone explain this, so it makes sense to me ?

 

I have not found a Lathe Post yet, since this * two was intriguing me, but I will also continue in that direction.

 

Thanks for the Help

 

Mark ( .0002 ) Anderson

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