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:

put a Misc integer in buffer for later use in lathe post


Dave Loveridge
 Share

Recommended Posts

I am modifiing a V9 lathe post and I want to put a value in the first mi operation of a program and store it for later use. It works somewhat but when I use the value it resets the value to 0 when it is used and when I got to use it again it does not work because the value is 0.

Please help this is frustrating me.

 

Thanks in advance

Dave Loveridge

Loveridge Machine Co.

Link to comment
Share on other sites

As I understand it, you are just trying to preserve the value from a

Misc Integer at the start of the program so you can check it (use it) later one.

You mentioned storing it to a Buffer ("Buffer" means an external FILE to a post).

If you just trying to save this ONE misc integer value, that would probably

be overkill. I would just declare a variable to hold that value.

 

Then in the Start of File postblock, capture the Misc. Integer you want to save.

(The postblock would be either LSOF -or- PSOF)

 

code:

my_value : 0   # Declare a variable

 

lsof #Start of file for non-zero tool number, lathe

my_value = mi1 # Save value in "mi1" at start of 1st operation.

---------------

 

Since this is the only place that "my_value" is loaded with a value,

you know that when you look at it later on in the post, it will hold

the 1st operation (program startup) value.

Link to comment
Share on other sites

quote:

Yes I did what you said, the problem is once I use it later down in the program it changes it to a zero value, then when I need to use it a second time it is no good.

Can you either post on the ftp or e-mail the post to me? If this is happening the way you suggest, we could all be in for some BIG trouble.

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