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 modification


ChrisD
 Share

Recommended Posts

Can anyone tell me why when I force output of mr2

the I get this: G91 Bmr2 90. Is it something to do with the format statement? I would like it to com out like this: G91 B90.

 

Any help would be greatly appreciated

 

Chris

Link to comment
Share on other sites

quote:

Is it something to do with the format statement?

Yes, it is.

If you output the value of a variable that does not have a format assigned to it, the default format used is format #1. In this special situation the name of the variable is output along with it's value. One reason for this is to let you know that you have not done something you want to do -> assign a format to the variable.

 

Assign a format to 'mr2', something like this ->

fmt B 1 mr2

 

Note that this also gets you the letter 'B',

so if you had "B" hard-coded in your PST, you will want to remove that.

Link to comment
Share on other sites

Actually I had this thought just after I sent the posting.

 

I had to change: fmt mr2 4

 

to: fmt 4 mr2

 

And it worked fine.

 

It seems it will output the actual name of the real value plus the given value if you tell it

that mr2 has a certain decimal value redface.gif

 

Thanks guys.

Link to comment
Share on other sites

Chris,

 

The rule in MP is:

 

If a variable has not been formatted for output via a Format Assigment (FMT), then the variable will be output using Format Statement #1 (fs2 1) and with the variable name as a prefix. If you are using X,Y,Z, XR,YR,ZR,XH,YH,ZH they are formatted to FS 1 with a prefix of X,Y,Z automatically. The same olds true for I,J,K except the prefix is I,J,K.

 

I hope this helps!

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