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:

Intermittently Stopping Machine at Tool Changes


tiredtoolmaker
 Share

Recommended Posts

Re: X7

Haas VF6

 

Example: I've got six tools with the last being a reaming cycle. I want the machine to only stop before the reaming cycle. My post outputs a M01 before each tool change. I accomplish this editing the program by changing the last M01 to M00 and leaving optional stop turned off at machine. I understand this is not a big deal with a small program but could be time consuming in a large one. Is there an easier way to accomplish this?

Link to comment
Share on other sites

Wouldn't it be cool if you could type something like "spindle_on$", "optional_stop$", "coolant_on$" etc in the manual entry and the post-processor would use this pseudo-code to convert the codes into actual G and M-codes, instead of using the machine-specific codes?

Link to comment
Share on other sites

If this is always a process you follow, why not just edit the Post Processor, so it is just "automatic", and you don't have to even bother inserting a Manual Entry?

 

This is the "bore 1" cycle:

pbore1$          #Canned Bore #1 Cycle
      pdrlcommonb
      pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout, pcout,
        prdrlout, dwell$, *feed, strcantext, e$
      pcom_movea

Add a line of code, and Boom! You are in business...

pbore1$          #Canned Bore #1 Cycle
      pdrlcommonb

      #Add one, or more M00 lines. Add "#" before line to remove.
      pbld, n$, sm00, "(CHECK BORE FOR CHIPS)", e$

      pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout, pcout,
        prdrlout, dwell$, *feed, strcantext, e$
      pcom_movea

Or, get creative?

pbore1$          #Canned Bore #1 Cycle
      pdrlcommonb

      #Add one, or more M00 lines. Add "#" before line to remove.
      pbld, n$, sm00, "(CHECK BORE FOR CHIPS)", e$

      # OR Add Macro Logic (if supported) to force control message
      pbld, n$, "#3006=1 (CHECK BORE FOR CHIPS, OR YOU MIGHT GET FIRED!)", e$
      pbld, n$, "#3006=1 (SERIOUSLY. REMEMBER LAST TIME SCOTT? WELL, I DO.)", e$

      pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout, pcout,
        prdrlout, dwell$, *feed, strcantext, e$
      pcom_movea
  • Like 3
Link to comment
Share on other sites

Wouldn't it be cool if you could type something like "spindle_on$", "optional_stop$", "coolant_on$" etc in the manual entry and the post-processor would use this pseudo-code to convert the codes into actual G and M-codes, instead of using the machine-specific codes?

 

You could do this very easily, using the tools that already exist in the MP Language for working with Strings. These are the String Functions, and there are quite a few of them available.

 

No reason to use the dollar sign ($), unless you specifically want to.

 

There are two functions that would be applicable here:

 

'strstr' - The "string to string" function is a comparison function. So you could have some strings already created in your post, and just test for the presence of these strings, in the input string. Then tie in that value to a String Select function, where "off" or "0" is just an "empty" string, and "1" activates whatever M Code you want to come out.

 

'scan' - The "Scan" function looks for a string, within a string, (much like "strstr"), but the purpose is to identify a number (as part of the string) that immediately follows the string that was found.

 

Consider the string:

 

tool_dia 0.75 mch_stop 2 flood_cool 1 thru_cool 1 wash_cool 1

 

We could use that to scan for a string, and capture the "number" that follows that string. In the preceding string, we could potentially set 5 numeric variables, based on the sub-strings present.

Link to comment
Share on other sites

Another great option would be to scan for a real number, using the 'scan' function, and then use the 'plcval' function to read the on/off state of each integer or decimal digit. For example, you could have a number with 6 Integer and 6 decimal digits, and scan to the left or right of the decimal point with 'plcval'. So with this function, you could have 12 "switches" in a single "number" 111000.001011 for example...

Link to comment
Share on other sites

custom drill cycle comes to mind for this.

or logic in post that checks tool (if reamer ) ad M0

I could see this for tapping too if one is in hard metals and want to brush on special tap fluid?

 

this is making me start to think, we dont do much production here and a lot of hard metals. I would not want this in production-cell or lights out arena as could cost huge time but it has its place.

thanks for the idea's

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