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:

Tool lIst with Z depth


JParis
 Share

Recommended Posts

I'm stuck.

I am trying to get a tool list to come out at the top of the post that includes the min_z depth.....

I am getting it partially but the depths are coming out on the wrong tool..the depths need to move up a tool.

I also have an issue where if a tool is recalled later in the program those depths are simply ignored...

(T31010314 / .314 FORM TOOL / Z99999.)
       (607-016-700 / MIN TOOL EXT - 1.250)
 
(T11020500 / 1/2 3FL DESTINY VIPER / Z-.305)
       (V33212S / MIN TOOL EXT - 1.250)
 
(T12010375 / 3/8 3FL ENDMILL / Z-.1)
       (V32410S / MIN TOOL EXT - 1.150)
 
(T70010563 / .5625 REAMER / Z-.5)
       (SERIES #735 / MIN TOOL EXT - 4.500)
 
(T11010250 / 1/4 3FL ENDMILL / Z-1.8)
       (V31608S / MIN TOOL EXT - .850)
 
(T13010250 / 1/4 2FL BALLMILL / Z-.821)
       (BV21608S / MIN TOOL EXT - .750)
 
(T11010188 / 3/16 3FL ENDMILL / Z-.169)
       (V31209S / MIN TOOL EXT - .750)
 
(T11010125 / 1/8 ENDMILL / Z-.11)
       (V308060S / MIN TOOL EXT - .750)

My tooltable is coded out like this

ptooltable      #Tooltable output
      preadbuf5
      if t$ >= zero,
      [
      sopen_prn, *t$, " / ", pstrtool, " / ",  *min_depth, sclose_prn, e$
       "       ", sopen_prn, *stool_numb, " / ", "MIN TOOL EXT - ", *tool_out_length, sclose_prn, e$
      " ", e$
      ]  

my pwrtt$ section like this

pwrtt$          #Pre-read NCI file
      t$ = wbuf(4,wc4)        #Buffers out tool number values
      #if tool_info > 1 & t$ > 0 & gcode$ <> 1003, ptooltable
      if gcode$ <> 1003, ptooltable
      tnote = t$
      toffnote = tloffno$
      if use_g10, pwritbuf9
      pwritbuf5

 

So I am trying to get this fixed up....

I also note that it seems there is still no parameter available to the the Tool Manufacturer into the post.. 

Can anyone offer some suggestions on where to go from here?

Link to comment
Share on other sites
22 minutes ago, JParis said:

I also note that it seems there is still no parameter available to the the Tool Manufacturer into the post.. 

In BNCITypes_CH.h I see this under the mill codes -> 

/// mill nci - tool definition - manufacturer
struct nci_mill_20002a
	{
	TCHAR mfg[MAX_BNCI_STR];		//!< manufacturer
	};

 

Link to comment
Share on other sites

The issue with 'z_min$' depth, is that it isn't calculated until the end of the loop. (Basically, 'z_min$' is only calculated once the 'path' has been read. That is why you're getting the 'z_min$' value for the "last path", on each tool entry in the table.

My suggestion: capture the 'z_min$' values (and z_max$, if needed), into a Buffer File during the Pre-Read Event. (pwrtt$) and then write logic into 'psof$' to read the buffer, filter the data, and match up the Z values, with the Tool Data you're trying to capture.

Link to comment
Share on other sites
29 minutes ago, JParis said:

I'm stuck.

I am trying to get a tool list to come out at the top of the post that includes the min_z depth.....

I am getting it partially but the depths are coming out on the wrong tool..the depths need to move up a tool.

I also have an issue where if a tool is recalled later in the program those depths are simply ignored...


(T31010314 / .314 FORM TOOL / Z99999.)
       (607-016-700 / MIN TOOL EXT - 1.250)
 
(T11020500 / 1/2 3FL DESTINY VIPER / Z-.305)
       (V33212S / MIN TOOL EXT - 1.250)
 
(T12010375 / 3/8 3FL ENDMILL / Z-.1)
       (V32410S / MIN TOOL EXT - 1.150)
 
(T70010563 / .5625 REAMER / Z-.5)
       (SERIES #735 / MIN TOOL EXT - 4.500)
 
(T11010250 / 1/4 3FL ENDMILL / Z-1.8)
       (V31608S / MIN TOOL EXT - .850)
 
(T13010250 / 1/4 2FL BALLMILL / Z-.821)
       (BV21608S / MIN TOOL EXT - .750)
 
(T11010188 / 3/16 3FL ENDMILL / Z-.169)
       (V31209S / MIN TOOL EXT - .750)
 
(T11010125 / 1/8 ENDMILL / Z-.11)
       (V308060S / MIN TOOL EXT - .750)

My tooltable is coded out like this


ptooltable      #Tooltable output
      preadbuf5
      if t$ >= zero,
      [
      sopen_prn, *t$, " / ", pstrtool, " / ",  *min_depth, sclose_prn, e$
       "       ", sopen_prn, *stool_numb, " / ", "MIN TOOL EXT - ", *tool_out_length, sclose_prn, e$
      " ", e$
      ]  

my pwrtt$ section like this


pwrtt$          #Pre-read NCI file
      t$ = wbuf(4,wc4)        #Buffers out tool number values
      #if tool_info > 1 & t$ > 0 & gcode$ <> 1003, ptooltable
      if gcode$ <> 1003, ptooltable
      tnote = t$
      toffnote = tloffno$
      if use_g10, pwritbuf9
      pwritbuf5

 

So I am trying to get this fixed up....

I also note that it seems there is still no parameter available to the the Tool Manufacturer into the post.. 

Can anyone offer some suggestions on where to go from here?

Hi John,

I noticed you removed the condition 't$ > 0' from your call to 'ptooltable'. This causes MP to process 'every single Tool Change event'. Which is likely not what you're after. The reason: Depth Cuts and Multi-Passes are output as a 'Null Tool Change' event. This means you'll get an entry in the Tool Table for each pass and/or depth cut.

MP has a mechanism built in, which automatically switches the sign of 't$', as the 'pwrtt$' loop is running. For each 'new instance' of a Tool Number, 't$' is signed positive. For every other occurance (Op change, or depth-cut/multi-pass), the tool number is signed negative.

I have not had the opportunity to play around with the functions much, but the "Enhanced Tool Table" functions will likely get you what your after. The problem? <- We've been trained to do it the "old way", using 'pwrtt$' and 'pwrttparams$' for a long time. Plus, there isn't much 'sample code' where they are exclusively using the new Enhanced Tool Table functions, to use as a template. Also, the methods themselves, are mutually exclusive. You've got to "convert the whole mechanism over to Enhanced TT", and can't mix-and-match.

I'd probably have an easier time doing this with a Buffer File, and just building my own TT output in 'psof$', rather than converting everything over to use Enhanced TT.

I've seen a few requests for this lately. Maybe I should put together a new YouTube video to show how I'd handle this...

Link to comment
Share on other sites
Just now, byte me said:

That was the only one I saw marked Manufacturer, I don't see it elsewhere either..

Yeah, I'm not sure when that one snuck in there but I stumbled across is after outputting the parameter codes...

SO I used that as needed info...but Tool Manufacturer still MIA

Thanks for looking

 

Colin,

Yeah, I'll have to dig in and see what I can come up with....I can work with existing buffers but gawd I hate'm lol

Link to comment
Share on other sites
5 hours ago, JParis said:

Yeah, I'm not sure when that one snuck in there but I stumbled across is after outputting the parameter codes...

SO I used that as needed info...but Tool Manufacturer still MIA

Thanks for looking

 

Colin,

Yeah, I'll have to dig in and see what I can come up with....I can work with existing buffers but gawd I hate'm lol

Lol, yeah, I used to hate them.

BTW, since you're looking at Buffers...

I posted the videos from one of my old classes on Buffer Files, to my YouTube Channel. So if you need a refresher on how they work, there are 8 videos from that class available.

  • Like 2
Link to comment
Share on other sites

I posted this on the offical forum but thought I'd throw it out here if anyone can help..

OK, so I have I believe everything copied into my post...

The standard table appears to be working properly..

 

Now I am looking to modify the output and could use a bit of direction

 

Doing it the old way and drawing out parameter values like so...

#      if prmcode$ = 20002, stool_numb = ucase(sparameter$) 

#      if prmcode$ = 20007,

#         [

#          tool_out_length = rparsngl(sparameter$, 3)

#          tool_hold_length = rparsngl(sparameter$, 7)

#         ]

 

I am looking to the opinfo command but it's not working as desired, so I am certain I am using it improperly...in trying different variations of the calls to figure out the proper, I am currently here

ptooltable$

      if use_g10, pwritbuf9

      pwritbuf5

      if tt_count$ = TOOL_NOT_OUTPUT@,

        [

        stool_numb = opinfo(20002, tool_index)

        tool_out_length = rparsngl(opinfo(20007, 0),3)

        result = fprm(101, zero)

        sopen_prn, *tt_tool$, sdelimiter, ptool_name, sdelimiter, pget_tool_z_min(tt_tool$), sclose_prn, e$

            "        ", sopen_prn, *stool_numb, " / ", "MIN TOOL EXT - ", *tool_out_length, sclose_prn, e$

            " ", e$

        ]

This gets me part of the way there the 1st tool picks up the correct cutter part number 607-016-700 but on the following lines fails to pick out and post the value.The trying to get the tool stickout, I have not found the proper command to pick it up...


(T31010314|.314 FORM TOOL|Z DEPTH: -.305)

        (607-016-700 / MIN TOOL EXT - .000)

(T11020500|1/2 3FL DESTINY VIPER|Z DEPTH: -.1)

        (-99999 / MIN TOOL EXT - .000)

(T12010375|3/8 3FL ENDMILL|Z DEPTH: -.5)

        (-99999 / MIN TOOL EXT - .000)

(T70010563|.5625 REAMER|Z DEPTH: -1.8)

        (-99999 / MIN TOOL EXT - .000)

(T11010250|1/4 3FL ENDMILL|Z DEPTH: -.821)

        (-99999 / MIN TOOL EXT - .000)

So how do I get this line to reread on each tool stool_numb = opinfo(20002, tool_index)

and what is the proper way to access this info

tool_out_length = rparsngl(opinfo(20007, 0),3)

Link to comment
Share on other sites
ptooltable$
      if use_g10, pwritbuf9
      pwritbuf5
      if tt_count$ = TOOL_NOT_OUTPUT@,
        [
        result = fprm(101, zero)
        pgettoolinfo
        sopen_prn, *tt_tool$, " / ", ptool_name, " / ", pget_tool_z_min(tt_tool$), sclose_prn, e$
            "        ", sopen_prn, *stool_numb, " / ", "MIN TOOL EXT - ", *tool_out_length, sclose_prn, e$
            " ", e$
        ]
      
pgettoolinfo
      sparameter$ = opinfo(20007, 0)
      tool_out_length = rparsngl(sparameter$, 3)
      stool_numb = opinfo(20002, 0)

Gets me what I was looking for

Quote

(T31010314 / .314 FORM TOOL / MIN Z DEPTH: -.305)
        (607-016-700 / MIN TOOL EXT - 1.250)
 
(T11020500 / 1/2 3FL DESTINY VIPER / MIN Z DEPTH: -.801)
        (V33212S / MIN TOOL EXT - 1.250)
 
(T12010375 / 3/8 3FL ENDMILL / MIN Z DEPTH: -.5)
        (V32410S / MIN TOOL EXT - 1.150)
 
(T70010563 / .5625 REAMER / MIN Z DEPTH: -1.8)
        (SERIES #735 / MIN TOOL EXT - 4.500)
 
(T11010250 / 1/4 3FL ENDMILL / MIN Z DEPTH: -.821)
        (V31608S / MIN TOOL EXT - .850)
 
(T13010250 / 1/4 2FL BALLMILL / MIN Z DEPTH: -.169)
        (BV21608S / MIN TOOL EXT - .750)
 
(T11010188 / 3/16 3FL ENDMILL / MIN Z DEPTH: -.48)
        (V31209S / MIN TOOL EXT - .750)
 
(T11010125 / 1/8 ENDMILL / MIN Z DEPTH: -.21)
        (V308060S / MIN TOOL EXT - .750)
 
(T61010125 / 1/8 X 90 DEG SPOT DRILL / MIN Z DEPTH: -.183)
        (15450 / MIN TOOL EXT - 1.250)
 
(T67010055 / #54 GO DRILL / MIN Z DEPTH: -.365)
        (6023124 / MIN TOOL EXT - 1.500)

 

  • Like 1
Link to comment
Share on other sites
2 minutes ago, JParis said:

The enhanced tool table "looks" to be a nice addition....

CNC though needs to do some serious documentation on it..thankfully JDucharme has taken pity on my soul and is helping with some direction and looking at something 

So is all this to write the minz/stickout of the tool in your nc file at post time?

Link to comment
Share on other sites
Just now, byte me said:

So is all this to write the minz/stickout of the tool in your nc file at post time?

That's part of it...I am also trying to capture some other things but that was what I thought was the path of least resistance to getting it done on the minz z depth..stock out was easy enough the old way

 

Link to comment
Share on other sites
1 minute ago, JParis said:

That's part of it...I am also trying to capture some other things but that was what I thought was the path of least resistance to getting it done on the minz z depth..stock out was easy enough the old way

 

Very interesting, what other information are you trying to capture? 

I've been shoving a bunch of tool and operation data in the comments, but that has limited size..

 

Link to comment
Share on other sites
Just now, byte me said:

Very interesting, what other information are you trying to capture? 

Tool Data, some of which is available, some of which is not yet and some of which I'm not sure how I am going to get in yet...I output on my setup sheets but I've been asked about getting it into the post so the operators have it right in front of them when they need to change a tool...

 

 

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