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:

Scan Post output for H0


Recommended Posts

First we need to define an error message. Do a search through your post for "error" and find a section that looks like this:

 


# --------------------------------------------------------------------------
# Error messages
# --------------------------------------------------------------------------
saxiswarn      : "WARNING - POST ROTARY AXIS ASSIGNMENT ('rot_on_x') OVERWRITTEN BY OPERATION"
saxisoff       : "ERROR - POST ROTARY AXIS ASSIGNMENT ('rot_on_x') IS DISABLED"
saxiserror     : "ERROR - INVALID ROTARY AXIS ASSIGNMENT ('rot_on_x') FOR CURRENT OPERATION"
sindxerror     : "WARNING - INDEX ANGLE DOES NOT MATCH POST SETTING ('ctable')"
stlorgerr      : "ERROR - TOOL ORIGIN DOES NOT MATCH CENTER OF ROTATION IN POLAR MILLING"
shomeserror    : "ERROR - G92 WORK OFFSET ('wcstype') DOES NOT SUPPORT TRANSFORM SUBPROGRAM"
ssubprgerror   : "ERROR - TOOL SUBS (REPS) ('mi1) DO NOT SUPPORT TRANSFORM SUBPROGRAMS - SET mi1$ TO ZERO AND REPOST"
scdsubprgerror : "ERROR - CUSTOM DRILL SUBS ('mi10) DO NOT SUPPORT TRANSFORM SUBPROGRAMS - SET mi10$ TO ZERO AND REPOST"
sprognoerror   : "ERROR - PROGRAM NUMBER CANNOT BE ZERO"
sprogfmterror  : "ERROR - NCI NAME MUST BE FORMATTED AS 5 SPACE DELIMITED FIELDS CONTAINING 'REV' AND 'OP' Example:'CC33042 REV 2 OP 1'"
sprgnerror     : "ERROR - SUBPROGRAM NUMBER MATCHES THE MAIN PROGRAM NUMBER"
scompwarn      : "WARNING - CUTTER COMP APPLIED ON ARC MOVE"
smiscerror     : "WARNING - MISC VALUES SET TO POST DEFAULT FOR CURRENT OPERATION"
srotaxerror    : "ERROR - MORE THAN 1 ROTARY AXIS DETECTED IN SELECTED AXIS COMBINATION - OUTPUT MAY BE INVALID"
swriteopserror : "ERROR - WRITE NC OPERATION INFORMATION MUST BE ENABLED IN CONTROL DEFINITION - SET AND REPOST"
sxaxiswarn     : "ERROR - SELECT MACHINE ACHIEVABLE TOOLPLANE WITH X-AXIS ALONG MACHINE X - SET AND REPOST"
syaxiswarn     : "ERROR - SELECT MACHINE ACHIEVABLE TOOLPLANE WITH Y-AXIS ALONG MACHINE Y - SET AND REPOST"
szaxiswarn     : "ERROR - SELECT MACHINE ACHIEVABLE TOOLPLANE WITH Y-AXIS ALONG MACHINE Y - SET AND REPOST"
srotlimwarn    : "WARNING - ROTARY LIMITS EXCEEDED (CANCEL TO EXIT)"
saxissuberror1 : "ERROR - AXIS SUBSTITUTION IS SETUP FOR HMC WITH -Y ZERO POSITION (PLANES 2,5,3,6)"
saxissuberror2 : "ERROR - AXIS SUBSTITUTION IS SETUP FOR VMC WITH +Z ZERO POSITION (PLANES 1,2)"
swcserror      : "ERROR - WORK OFFSET NUMBER OUT OF RANGE"

Let's add a new one for this example.

stool_length_error      : "ERROR - TOOL LENGTH OFFSET NUMBER IS ZERO"

 

Now look for the G43 output lines in your post. Usually there are two lines. One will be in ptlchg_com, and one in ptlchg0$.

 

Here we need to test for the condition to warn against, and trigger a warning message.

 

 

pbld, n$, "G43", *tlngno$, pfzout, scoolant, pfspindleout, next_tool$, e$

if tlngno$ = 0,
             [
             result = mprint(stool_length_error)
             exitpost$
             ]

 

HTH :)

Link to comment
Share on other sites

I put this right at the top of my toolchange postblock

 

  	if t$ <> tlngno$, pbld, "M00", e$ "(", "T & H DO NOT MATCH!!!!!!!!!!!!!!!!!!!!!!", ")", e$ "M00", e$
  	if t$ <> tloffno$, pbld, "M00", e$ "(", "T & D DO NOT MATCH!!!!!!!!!!!!!!!!!!!!!!", ")", e$ "M00", e$

 

Works like a charm!!!

Link to comment
Share on other sites
  • 3 weeks later...

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