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:

Holder alarm message...


Recommended Posts

Hello everyone,
   I am now getting into 200 - 300 toolpaths in one program as 6 ops.  I have been doing the HOLDERs and I would like to make the post reminds me if I am using DEFAULT HOLDER instead of my own.  Would you guys please point me to the right direction? (see image below)

 


 

Thank you

======================

Capture.thumb.PNG.e76fb34395a0187ffbbfc1cd929739aa.PNG

Link to comment
Share on other sites

The "strstr" function can be used to "scan" a string, and report back if the characters found, were present in the String variable being scanned.

You have to be careful, since the "matching" is exact characters, and is case-sensitive. So my advice would be to first use the 'ucase' function on the string you want to scan, to be sure all the characters are converted to Uppercase, before you use the 'strstr' function.

You will need to use 'pparameter$' to capture the 20020 string, before using 'ucase', and then using 'strstr'.

Note; you will need to define your "comparison variable string", in addition to a string used to capture the 20020 value.

Link to comment
Share on other sites
4 hours ago, Colin Gilchrist said:

The "strstr" function can be used to "scan" a string, and report back if the characters found, were present in the String variable being scanned.

You have to be careful, since the "matching" is exact characters, and is case-sensitive. So my advice would be to first use the 'ucase' function on the string you want to scan, to be sure all the characters are converted to Uppercase, before you use the 'strstr' function.

You will need to use 'pparameter$' to capture the 20020 string, before using 'ucase', and then using 'strstr'.

Note; you will need to define your "comparison variable string", in addition to a string used to capture the 20020 value.

 

Hello Colin,
   Thank you for the suggestion, and this is what I've done base on your ideas.  It works flawlessly.

 

Thank you.

 

==========================


#Region pCheckHolderName
sHolderCheck: ""
sDefaultHolderName : "Default Holder"
sHolderName        : ""
#sHolderError       = "Holder error in operation " + no2str(op_number) + "  Continue?"

sHolderCheck = "CUT# "+sToolPathNumber+" * Defined your HOLDER!!!"
               +no2asc(13)+"TOOL#"+no2str(t$)+", ("+s20001+")"
               +no2asc(13)
               +no2asc(13)+"You have DEFAULT HOLDER as labled."
               +no2asc(13)
               +no2asc(13)

pCheckHolderName
    sHolderName = opinfo(20020, 0)

    if sHolderName = sDefaultHolderName,
        [
        #//Throw an error
        #op_number = opinfo(15240, 0)
        if strstr ("PRODUCTION", sMaterialCommentExt) | 
           strstr ("TIGHT", sMaterialCommentExt) | 
           strstr ("COSMETIC", sMaterialCommentExt) |
           strstr ("PROTOTYPE", sMaterialCommentExt), [if mprint(sHolderCheck, 2) = 2, exitpost$] #
        ]
        

 

Put the "pCheckHolderName" anywhere you want it to check.

 

 

  • Like 2
Link to comment
Share on other sites

Steven, not to nit pick, but your English is wrong here:

 * Defined your HOLDER!!!"

That should be Define your Holder. Not Defined. Good work. I will be adding that to kind of logic to every customer post moving forward to hopefully get them in the habit of defining their holders.

Now you need to write logic to check the machine taper and make sure they are using the correct holder for the taper. They will have to follow the most strict of naming conventions so that your checking process will go correctly. Now you need to go back and re look at your stick out logic and make sure that takes into account your holder and then will have to cross compare that to the kinematics of the machine. That will then have to cross reference the part for every possible depth violation. then you need to cross reference that with every possible angle being cut and then you about .01% the way there to catching the next set of possible errors with your post.

How many lines is that post of yours now?

How long does it take to process a NC program?

Again applaud what your trying to accomplish and all the best.

  • Thanks 1
Link to comment
Share on other sites
On 12/31/2019 at 5:54 PM, PcRobotic said:

pCheckHolderName
    sHolderName = opinfo(20020, 0)

    if sHolderName = sDefaultHolderName,
        [
        #//Throw an error
        #op_number = opinfo(15240, 0)
        if strstr ("PRODUCTION", sMaterialCommentExt) | 
           strstr ("TIGHT", sMaterialCommentExt) | 
           strstr ("COSMETIC", sMaterialCommentExt) |
           strstr ("PROTOTYPE", sMaterialCommentExt), [if mprint(sHolderCheck, 2) = 2, exitpost$] #
        ]

For what it's worth, this is something I would consider bad practice.  The postblock is called pCheckHolderName but it checks the holder name and a bunch of other, unrelated conditions.

  • Thanks 1
Link to comment
Share on other sites
On 1/4/2020 at 7:35 AM, Zaffin said:

For what it's worth, this is something I would consider bad practice.  The postblock is called pCheckHolderName but it checks the holder name and a bunch of other, unrelated conditions.

Hello Zaffin,
   The reason is when I run parts in productions, everything must be defined because we have TOOL CRIB person, SETUP MAN to run.  If they are not clear, then it would be my accountable for them to understand my program and making good parts.  Of course they are responsible too but in some cases where parts must be in the HORIZONTAL machine, HOLDERS are a MUST to define, even more dangerous 5 AXIS HOLDERS must be defined or CRASH.   It is much easier to see in the computer and catching mistake rather than already happened in the machine which cost thousands or even 100 thousand dollars.

 

Thank you for your though, please make more great idea so I learn from you.

Link to comment
Share on other sites
On 1/4/2020 at 7:27 AM, 5th Axis CGI said:

Steven, not to nit pick, but your English is wrong here:


 * Defined your HOLDER!!!"

That should be Define your Holder. Not Defined. Good work. I will be adding that to kind of logic to every customer post moving forward to hopefully get them in the habit of defining their holders.

Now you need to write logic to check the machine taper and make sure they are using the correct holder for the taper. They will have to follow the most strict of naming conventions so that your checking process will go correctly. Now you need to go back and re look at your stick out logic and make sure that takes into account your holder and then will have to cross compare that to the kinematics of the machine. That will then have to cross reference the part for every possible depth violation. then you need to cross reference that with every possible angle being cut and then you about .01% the way there to catching the next set of possible errors with your post.

How many lines is that post of yours now?

How long does it take to process a NC program?

Again applaud what your trying to accomplish and all the best.


Hello 5Th Axis,
   After your suggestions, I always thought how to mesh your ideas and my needs into the post.  Therefore, I have came up with "IF COMMENT CONTAINS PRODUCTION words, THEN ACTIVATE THE DEFAULT HOLDER check".  That way I am ensured that PRODUCT parts will be 100% repeatable every time with new setup, new person as DEFINED HOLDER and STICK OUT as well.

 

    I also defined tool stick out like this:
         "IF TOOL DIAMETER FROM 0 TO .03125 STICK OUT LENGTH > .250 THEN ALARM"
         "IF TOOL DIAMETER FROM 003125 TO .0625 STICK OUT LENGTH > .375 THEN ALARM"
         "IF TOOL DIAMETER FROM 0.06125 TO .125 STICK OUT LENGTH > .500 THEN ALARM"
 

 

and so on... up to .750 tool diameter.

 

Let me know if you think there is a better way.

 

Thank you.

Link to comment
Share on other sites
1 hour ago, PcRobotic said:


Hello 5Th Axis,
   After your suggestions, I always thought how to mesh your ideas and my needs into the post.  Therefore, I have came up with "IF COMMENT CONTAINS PRODUCTION words, THEN ACTIVATE THE DEFAULT HOLDER check".  That way I am ensured that PRODUCT parts will be 100% repeatable every time with new setup, new person as DEFINED HOLDER and STICK OUT as well.

 

    I also defined tool stick out like this:
         "IF TOOL DIAMETER FROM 0 TO .03125 STICK OUT LENGTH > .250 THEN ALARM"
         "IF TOOL DIAMETER FROM 003125 TO .0625 STICK OUT LENGTH > .375 THEN ALARM"
         "IF TOOL DIAMETER FROM 0.06125 TO .125 STICK OUT LENGTH > .500 THEN ALARM"
 

 

and so on... up to .750 tool diameter.

 

Let me know if you think there is a better way.

 

Thank you.

I don't know a better way why if you use Verification software and define everything correctly in Mastercam and use the correct interface for them then a lot of what your chasing would be a non issues. To go eve further if you have defined everything correlated in Mastercam and use the Mastercam Verify it catches about the same number of mistakes a Verification software does so again I see a lot of what your doing as pointless, but your determined to keep working on it so I am just trying to give you food for thought.

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