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:

Conditional formatting in a post


dem
 Share

Recommended Posts

Does anyone know how to do conditional formatting in a Mastercam ver9.0 post ?

I am trying to create a post for a 4 axis (rail & side head) lathe. I want to use a misc value to select the axis and output either X/Z or U/W code. (Example 1.Rail 2.Side (mi6) ?)

Then in the post I would like to perform a conditional format for xabs and zabs.

 

If mi6=1

fmt N 4 n

fmt X 2 xabs

fmt X 2 Zabs #FOR X&Z RAIL HEAD

.

.

if mi6=2

fmt N 4 n

fmt U 2 xabs

fmt W 2 zabs #FOR U & W SIDE HEAD

 

I know that I can make separate posts for each axis, but I only want to manage one post.

Any suggestions ?

Link to comment
Share on other sites

Dave-

I went thru the books that came with Ver 9 and do not have post documentation. The only book I have is from ver 5.0. I ordered the post CD this afternoon. It will not be coming in for a few days.

The old book does not reference "reformating" newfs or nwadrs

Can you explain ?

Link to comment
Share on other sites

code:

     11 September 97 - MP, MPL, MPWIRE V5.00

Functions for format statement and prefix letter reassignment are

added. 'newfs' allows a different format statement to be associated

with a variable. The format statement must be defined. It returns

a zero on failure and one on success. Care should be used not to

round a value for later output.

'nwadrs' allows the prefix string to be changed. It returns a zero if

the new prefix was truncated to 15 characters or one if not truncated.

Ex.

fs 1 3.3l

fs 2 3.3t

fmt X 1 var

var : 1.2

stry Y

panypostblock

*var

result = newfs (2, var)

*var

result = nwadrs (stry, var)

*var

Output is: X001.2 X1.200 Y1.200

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