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:

Check 1ST PECK-SUBSEQUENCE PECK, MINIUM PECK


Recommended Posts

Hi,

  We have some old, old and old mastercam programs and when we use that old program to open with X6 or X7 some of the values change and that's why I did write the value check. 

 

   I did everything so far and the only issue I have is 1ST PECK in the CUT PARAMETERS.  I would like to write like this:

 

If 1st peck >  (TOOL DIA ÷ 3)  then show message.

 

   I know how to make construct the alarm message and the only issue is I can't get the TOOL DIA value works in this case.  I don't know why.

 

 

   Please help, thank you.

Link to comment
Share on other sites

You may have to grab the tool dia at the tool change and store it in a created variable.

 

tl_dia = tldia$

tl_dia = tldia/3

 

Depending on where it's being read out, it may be already changed and make sure your using the correct variable

 

 

If peck1$ > tl_dia, Error message

Link to comment
Share on other sites

Hi JParis,

   I tried as you instructed and it got an error message that "LABLE NOT BEEN DEFINED" where do I define the tl_tia?

 

To have a better understanding, below here is my statement.  Thank you.

 

 

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

         tool_dia = tldia$
         tool_dia = tldia/3
         if (peck1$ > tool_dia, [if mprint(speckcheck, 2) = 2, exitpost$] # Check Drill Peck
 

Link to comment
Share on other sites

Hi JParis,

   I tried as you instructed and it got an error message that "LABLE NOT BEEN DEFINED" where do I define the tl_tia?

 

To have a better understanding, below here is my statement.  Thank you.

 

 

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

         tool_dia = tldia$

         tool_dia = tldia/3

         if (peck1$ > tool_dia, [if mprint(speckcheck, 2) = 2, exitpost$] # Check Drill Peck

You have to define it, it is a created variable

 

fmt 2 tl_dia

Link to comment
Share on other sites

Oh, I know why already.....

 

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

tool_dia = tldia$
tool_dia = tldia/3  ----------------------- it is missing $  tldia$/3
if (peck1$ > tool_dia, [if mprint(speckcheck, 2) = 2, exitpost$] # Check Drill Peck.

 

 

Thank you, I got it JParis.

Link to comment
Share on other sites

You may need some additional logic in there....If you only want to check certain things you'll need to restrict it via some logic to only check what you want...

 

 

Tough to say for certain without exactly seeing what you did and the parameters of what you do and don't want checked

Link to comment
Share on other sites
PcRobotic, on 31 Jul 2014 - 1:49 PM, said:

Hi JParis,

   I posted with single toolpath the it worked, when I post with many others then it started to have false warning even though my peck is under 30% of the tool dia.  Do you know why?

 

 

 

Thanks.

 

The same code that you put into psof needs to be put in ptlchg.  This will update your variable for each tool.

Link to comment
Share on other sites

Thanks JParis andEx-wccprogrammer,

   This is what I did and I hope I can get some help to point out what I really did wrong.

 

AT...

# --------------------------------------------------------------------------
# Toolchange / NC output Variable Formats
# --------------------------------------------------------------------------

fmt "D" 2 tool_dia

 

Right after that I added..........

 

ptlchg_errorpop #Pop-up common toolchange errors

         errorcheck = 1
          [
         tool_dia = tldia$
         tool_dia = tldia$/3
            if opcode$=3 & peck1$ > tool_dia, [if mprint(speckcheck, 2) = 2, exitpost$] # Check Drill Peck
          ]

 

Then....

#Root Mastercam location
sroot      : ""
stemp      : ""
smpname    : "APPS\MP.DLL"
smcamdir   : "%MCAMDIR%"
spostname_sav : ""

#Launch HTML.set during posting
launch_set : 0           # Autorun .SET Setup Sheet Template [0=No,1=Yes]
sset     : "HTML.SET"      # Name of the .SET Setup Sheet template file to be used
sdll     : ""              # Path/Name of the MP.DLL to be called

spath_in : ""                 # Will be the "path\name" of the NCI input file
spath_out : ""                # Will be the "path\name" of the DOC output file
spath_set : ""                # Will be the "path\name" of the .SET file
sparams : ""                  # Will be the command parameter line passed to the DLL
sextdoc  : ".DOC"          # .SET file extension
sspace   : " "             # Contains a SPACE character
ssq      : "'"             # Contains a Single Quote character
sdq      : '"'             # Contains a Double Quote character

# --------------------------------------------------------------------------
# Error Checks
# --------------------------------------------------------------------------

speckcheck = "CUT# "+sOpSeqNo+" * Tool May Break"+no2asc(13)+"TOOL#"
             +" ("+s20001+")"+no2asc(13)+no2asc(13)+"Confirm in CUT PARAMETERS"
             +no2asc(13)
             +"You have: "+no2str(peck1$)+" in 1ST PECK box"
             +no2asc(13)
             +no2asc(13)+"In order to avoid tool breaks from pecking,"
             +no2asc(13)+"peck must be 1/4 or 1/3 of TOOL DIAMETER is max Q value."
             +no2asc(13)
             +no2asc(13)
             +"Click OK to proceed posting."+no2asc(13)
             +"Click CANCLE to abort posting."+no2asc(13)

Link to comment
Share on other sites
speckcheck = "CUT# "+sOpSeqNo+" * Tool May Break"+no2asc(13)+"TOOL#"
             +" ("+s20001+")"+no2asc(13)+no2asc(13)+"Confirm in CUT PARAMETERS"
             +no2asc(13)
             +"You have: "+no2str(peck1$)+" in 1ST PECK box"
             +no2asc(13)
             +no2asc(13)+"In order to avoid tool breaks from pecking,"
             +no2asc(13)+"peck must be 1/4 or 1/3 of TOOL DIAMETER is max Q value."
             +no2asc(13)
             +no2asc(13)
             +"Click OK to proceed posting."+no2asc(13)
             +"Click CANCLE to abort posting."+no2asc(13)

Right here are you seeing this in your post?

Link to comment
Share on other sites

Hi Crazy Millman,

   So do I need to add anything beside these?

 

speckcheck = "CUT# "+sOpSeqNo+" * Tool May Break"+no2asc(13)+"TOOL#" +" ("+s20001+")"+no2asc(13)+no2asc(13)+"Confirm in CUT PARAMETERS" +no2asc(13) +"You have: "+no2str(peck1$)+" in 1ST PECK box" +no2asc(13) +no2asc(13)+"In order to avoid tool breaks from pecking," +no2asc(13)+"peck must be 1/4 or 1/3 of TOOL DIAMETER is max Q value." +no2asc(13) +no2asc(13) +"Click OK to proceed posting."+no2asc(13) +"Click CANCLE to abort posting."+no2asc(13)

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

If you are having problems with multiple toolpaths on the same tool, I would suggest creating a variable to hold the value of peck1$.  In ptlchg0, you could specify my_peck = peck1$.  That would give you more reliable calculations when checking for the error message.

Hi Ex-wccprogrammer,

   Where do I define my_peck = peck1$?

 

 

I know that I have to put in the PTLCHG0, do I have to define as a variable? at somewhere else for my_peck

 

Thanks.

Link to comment
Share on other sites

There are two different ways to define a numeric variable.  The first way is to create an unformatted variable.  You can use this method if you are not going to post the value of the variable.  It is defined like this:

 

my_peck : 0

 

The second way is to define a formatted variable.  By formatting, the data is configured to be output to the nc file by selecting the type of format from the list of available formats.  A letter prefix can also be specified.  It is defined like this:

 

fmt  "Q" 2  my_peck         #Peck1$ output
 

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