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:

Make Your Post Catch Common Errors


Recommended Posts

PcMannnn,

 

Do this for (2D) mill stuff:

 

Remember? Now define another variable:

OpTopOfStock : 0 # Operation Top of Stock

 

Add another parameter read at pparameter$ postblock:

if prmcode$ = 10027, OpTopOfStock = rpar(sparameter$, 1) # Operation Top of Stock

 

In your post should be some similar I assume... (3 times)

Change them, add an error handling line:

#
"( DOC =", *operation_depth, ")", e$
if OpTopOfStock < operation_depth, [if mprint("Something is verrryyyy-verrryyyy wrooonnngggg", 2) = 2, exitpost$]
last_op_id = op_id$
#

Link to comment
Share on other sites

Your post has some error string in this area, you can add another.

Luckily we have "sOpSeqNo" variable also + toolname.... So you can bulit your own error message:

# --------------------------------------------------------------------------
# Error Checks
# --------------------------------------------------------------------------
sOpSeqNo		 : "" #Operation manager displayed operation number
stoollengthoffserror = "Look for CUT# " + sOpSeqNo + ": " + "(" + s20001 + ") WRONG TOOL LENGTH OFFSET#"
sg53xyz = "Look for CUT# " + sOpSeqNo + ": " + "(" + s20001 + ") UNUSUAL G0 G53 XYZ VALUE IN HERE"
stoollengthoffszeroerror = "Look for CUT# " + sOpSeqNo + ": " + "(" + s20001 + ") WRONG TOOL LENGTH OFFSET"
stooldiameteroffserror = "Look for CUT# " + sOpSeqNo + ": " + "(" + s20001 + ") WRONG CUTTER COMP"
stooldiameteroffszeroerror = "Look for CUT# " + sOpSeqNo + ": " + "(" + s20001 + ") WRONG CUTTER COMP#"
scoolantisoffserror = "Look for CUT# " + sOpSeqNo + ": " + "(" + s20001 + ") NO COOLANT"
sdrl_sel_tos$ = "Look for CUT# " + sOpSeqNo + ": " + "(" + s20001 + ") WRONG TOP OF STOCK"
serrordetect = "Click OK to Q.C source program, click CANCEL to ignore"

sMyFancyDepthError = "Look for CUT# " + sOpSeqNo + ": " + "(" + s20001 + ") WRONG TOP OF STOCK"

 

And change these lines to:

(add sMyFancyDepthError variable)

if OpTopOfStock < operation_depth, [if mprint(sMyFancyDepthError, 2) = 2, exitpost$]

 

Should work...

  • Like 1
Link to comment
Share on other sites

Hi Peter,

Is there away that I can force the window appears the value? ( Please see attach image)

 

PS: Regardless of the colors, they are only to meant to demonstrate for easier to read.

 

 

I wish you were my neighbor, to have dinner with and to learn from. You are one of the amazing guys in this forum.... Once again, thank you for your so much valuable time that you spent for me.

 

 

 

Best regards,

S.Luong

post-40265-0-36499300-1379509728_thumb.jpg

Link to comment
Share on other sites

:D I need beer only. A lot! :D

Anyway, nothing is impossible... ;)

 

First, format your output:

fmt "Top of Stock: "  2   OpTopOfStock  # Operation Top of Stock

 

Then you can simply add it to the error string:

sMyFancyDepthError = "Look for CUT# " + sOpSeqNo + ": " + "(" + s20001 + ") WRONG TOP OF STOCK" + "Becase depth is " + operation_depth + " BUT " + 2OpTopOfStock

 

Or something like that. I'm not checked, but should work.

Where is my beer??? :D

  • Like 1
Link to comment
Share on other sites

Expanding on above post, the same applies to drl_sel_ref$ and drl_sel_tos. (Note NO $)

 

drl_sel_ref$ is R plane on initial start drill cycle (1st hole)

drl_sel_tos is used on initial start drill cycle (1st hole).

drl_sel_tos$ is used on all subsequent holes.

 

May be I'm wrong, but I made some test, and drl_sel_ref$ and drl_sel_tos$ returns as negative in the following valid situation:

I'm working on a post to catch these type of errors and I think about another solution.

Link to comment
Share on other sites

I use some of those variables in a custom drill cycle that I use. But I have not used the 2 you have listed. I got the information about what they do from the MP guide. Play around with it, and let us know what you come up with.

 

This thread is evolving into some features that are more advanced than I have used so far. :smoke: I will pick out the useful tricks for incorporation into my arsenal, thanks to all that have (and will have) contributed! :cheers:

Link to comment
Share on other sites

Peter, you have a fan. :laughing:

 

PcRobotic, we post snippets of code to show how things can be done in a post. The intent (as far as I am concerned) is to guide others how to make similar edits on their own. I for one have no interest in making every single edit for you. Take the ball and run with it. If you get stumped, then by all means ask.

 

Perhaps Peter has enough idle time to write every snippet of code that you desire.

 

Cheers! :cheers:

Link to comment
Share on other sites

Peter, do you live in the U.S? Let me know if you are, I really want to send you something for my appreciation.

No, but don't worry, if I will (and I will!) spend my holiday in California, I'll stop by... :D :D

 

 

I'm getting greedy since I'm thrill with your functions. Is that possible that I can force it output at the popup window just like the WRONG TOP OF STOCK like, WRONG CUTTER COMP VALUE with value or TOOL LENGTH HEIGHT value?

You lucky, beacuse in these days I have a bunch of time... (but I have no a bunch of beeerrr...!!! :D :D)

I'll take a look, but not promise

 

 

Peter, you have a fan. :laughing:

 

Perhaps Peter has enough idle time to write every snippet of code that you desire.

Cheers! :cheers:

Yessss and yes! :D:laughing: As I said, in these days I have a lot of free time to play with, until october, so PcRobotic get hurry! ;)

Link to comment
Share on other sites

Suppose the TOP OF STOCK = -1.100 and the DEPTH = -1.757

 

and someone made mistake and put the TOP OF STOCK = -2.000 and the DEPTH is okay = -1.757

 

G43 H20 Z.1 T16 M8(DOC= Z-1.857)

M135 S320

G98 G84 Z-1.757 R-2.000 F10. --------------------------> WRONG ARE VALUE base on TOP OF STOCK VALUE GIVEN...

X3.4047 Y-3.4047

 

Before we go ahead, stop for a moment here, at drilling stuff.

One thing crossed my mind, and I made some test with drilling. Basically I can say, that there is 2 important value at every

drill toolpath. One is RETRACT as a basic starting point and DEPTH which is end-depth.

So that's why I was confused about TopOfStock. It's not affect (not really, especially in absolute mode) the output of drilling

NC code. But the Retract and Depth (in Mastercam OP) they do, they give the "R" and "Z" value. Am I right?

 

PcRobotic, my confuson starts here, you mentioned and showed on a picture that Top of Stock value is wrong. Was -2 I think.

Are you sure that "R-2" comes from Mastercam Top of Stock setting? Did you tested?

I believe that (unfortunatelly) scrapped a part because R value was lower than Z, but I think it not comes from Top of Stock.

Yepp, I'm not checked in your post, I just wanna ask first.

 

This question and note is not for you only, it's for the community too! :)

 

Back to the topic, I think at drilling it's enough to compare the R and Z values.

Link to comment
Share on other sites

You already helped me to figured it out for the

 

G43 H20 Z.1 T16 M8(DOC= Z-1.857)

M135 S320

G98 G84 Z-1.757 R-2.000 F10. --------------------------> WRONG ARE VALUE base on TOP OF STOCK VALUE GIVEN...

X3.4047 Y-3.4047

 

I concern about the window thing because it tells the user what to expect to have certain COMP, TOOL LENGTH OFFSET (Please see attached image)

 

PS: Let me know when will you come to San Jose, California or Oakland, San Francisco because I can drive to these 3 cities and have drinks with you.

 

 

Thank you so much for your help, I'm definitely a FAN of you.

post-40265-0-98975700-1379538335_thumb.jpg

Link to comment
Share on other sites

You know these procedures are GOLDEN like checking INITIAL HEIGHT, RETRACT HEIGHT,

 

 

USE CLEARANCE ONLY AT THE START AND END OF OPERATION

G89 OR G88 WARNINGS.

 

 

 

These kind of rules are worth millions dollars for the HORIZONTAL where they run 100 pieces at the same time and if the post checks all the safety prior posting it just like we have to check all the gauges before flying an airplane for enough OIL, HYDROLLIC, ELECTRICITY... Same as CNC because one wrong G-CODES can cost someone's life and that is no body wants to happen.

 

May be too much checking at the programming room but it sure the heck of much easier for the setup-man.

 

 

 

Thank you Peter, once again I don't know how much thankful from me to you. You just blew me away with your positive attitude.....

post-40265-0-40170300-1379538862_thumb.jpg

  • Like 1
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...