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:

add logic to check for T and H match


Zoffen
 Share

Recommended Posts

i'm wondering what is a good way to write in some logic to a post to check that T and H match when posti

i'm thinking you add it in the toolchng section in the post and can probably figure the logic out but don't know how to make it generate an alarm.

 

so,

 

1. how do you make the post generate an alarm if a condition occurs?

 

2. would this work in the post:

if tlngno$<>t$
[ADD ALARM HERE]

 

or would i have to store them in separate variables at the toolchange and then compare them.

Link to comment
Share on other sites

Depending on the post you start with you my have to put it in psof$ as well as ptlchg$ section.

 

What I do in the haas post is add

 

tlngno$ = t$

and that always makes it equal to tool number.

 

If you want an alarm from post there's a few more steps

 

 

#Declare a string varible to output to screen and dummy varible
s_offset_err "Height offset does not match tool number!"
err_off : 0 # dummy varible to test output


#then add to ptlchg$ and maybe psof$

   if tlngno$ <> t$,[
           err_off = mprint(s_offset_err)
           tlngno$ = t$  # to automatically change it
           #exitpost$    # if you'd rather quit processing and fix in mcx (you have to remove#)
   ]

Link to comment
Share on other sites

There are times that it is not possible for T and H to match. For example, running a 40-tool program on a 30-tool machine. Having a post that automatically matches T and H is not ideal in my opinion. I prefer the notification that they do not match, that way nothing slips through. But I can use different T and H values if I need to.

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