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:

post comp type to tooltable


Recommended Posts

I have been trying to use the tooltable output to let our setup guys and operators know what type of comp is used. We use either "control" or "wear" depending on the machine (I know, I'm trying to get everyone to use wear, but it's going to take some time) - The problem I've noticed is that the post will only catch the comp value from the first operation of each tool. This becomes a problem when the first op might not use any comp. For example; using a drill cycle with an endmill to peck the center of a feature & then follow with a contour toolpath. It would also be useful to scan all the toolpaths and give an error if the same tool is using different comp types in multiple ops.

 

Can anyone tell me how to go about this? My post modifying skills are pretty decent; I've added a few misc. ops and tweaked thing here & there.

 

Thank-you.

 

-John

  • Like 1
Link to comment
Share on other sites

Take a look into buffers. Not really easy, but not impossible :)

I made a similar solution before, to find&track different offsets of tools, if there is any in NC code.

Example: If a tool, like "T5" uses H5 and D5 -> no warning.

But if this tool somewhere in an operation uses "H15" or "D55", than it puts a warning section in

front of NC code like (like a toollist):

N45 ( *********************************************************** )

N50 ( *** T5 use H15 in Bottom Finish Operation!!! *** )

N55 ( *********************************************************** )

Link to comment
Share on other sites

Aham, I found it! :) I just dig into my old things... :D

Well, I made a pretty clever toollist before, It tracks different "D" offset numbers (if a tool uses WEAR or CONTROL comp)

It write out all of them, if a tool uses more different, i.e.: "T5" uses "D15" and "D25" and more... ...or "H25" & "H55"....

Puts tool list in ascending order, using "T" numbers. And what else? Yes, it tracks toolplanes also, and create a list of planes

and write out the nam and comment of ToolPlane.

 

OK, well, lemme share it quickly....but it's hungarian, because.... :)

But I think it make sense or can be a good staring point.

If you wish, I can drop it into your post. (And translate it....) :)

 

# String bufferek változói
s_OpComment  : "" # Operáció comment buffer stringje
s_ToolName  : "" # Szerszám név buffer stringje
s_ToolPlaneName : ""    # Szerszám Sík Név buffer stringje
s_ToolPlaneComm : ""    # Szerszám Sík Comment buffer stringje
# Bufferek írásához/olvasásához változók
wait_to_check : 0  # WAIT TO CHECK kontroll flag
last_op_id  : 0  # Utolsó operáció ID, mert a "prv_op_id$" nem mindig műxik... :S
megjegyzes_start: 0	 # Megjegyzés kezd flag
megjegyzes_end : 0	 # Megjegyzés vége flag
# Szerszámlista változói
b1_MaxTool  : 0  # Buffer 1 tesztelő változó
b1_MaxOffset : 0  # Buffer 1 tesztelő változó
szerszam_out : 0  # Szerszám kiírva az NC kódba - flag
temp_counter : 0  # Számláló az új szerszámlistához
temp_counter_2 : 0  # Számláló az új szerszámlistához
temp_size  : 0  # Számláló az új szerszámlistához
delimiter_flag : 0  # Flag az új szerszálistában az első "D" előtti limiter figyeléséhez


#**************************************************************
#**************************************************************
#
# Figyelem!!!!!!
# a comp_type nincs mindig gyárilag definiálva!!!!
comp_type    : 0	 #Cutter compensation type - 0=computer, 1=control, 2=wear, 3=reverse wear, 4=off
#
#**************************************************************
#**************************************************************

#--------------------------------------------------------------------------
# Bufferek
#--------------------------------------------------------------------------
# Szerszám Buffer - 1
b1_index		    : 1	 # Buffer 1 - Index
b1_ToolNo		   : 0	 # Buffer 1 - Szerszám száma
b1_ToolLenOffs	  : 0	 # Buffer 1 - Szerszám hosszkorrekciója
b1_ToolDiaOffs	  : 0	 # Buffer 1 - Szerszám sugárkorrekciója
b1_ToolCompType	 : 0	 # Buffer 1 - Szerszám kontúr követés típusa - 0=Computer, 1=Control, 2=Wear, 3=Reverse Wear, 4=Off
b1_OpInteger_10	 : 0	 # Buffer 1 - mi10$ értéke adott operációhoz
b1_PlaneOffsetNo : 0  # Buffer 1 - Szerszám Sík azonosítószáma/Work Offset Number
rc1				 : 1
wc1				 : 1
size1			   : 0
fbuf 1 0 7 0 0
sbufname1$ = "D:\buffer_file_Szerszamok.txt"
fmt T   4   b1_ToolNo		   # Buffer 1 - Szerszám száma
fmt H   4   b1_ToolLenOffs	  # Buffer 1 - Szerszám hosszkorrekciója
fmt D   4   b1_ToolDiaOffs	  # Buffer 1 - Szerszám sugárkorrekciója
fmt G   4   b1_PlaneOffsetNo # Buffer 1 - Szerszám Sík azonosítószáma/OffsetNumber
# --------------------------------------------------------------------------
# Operáció Comment Buffer - 2
rc2			 : 1
wc2			 : 1
size2		   : 0
fbuf 2 0 255 0 1
sbufname2$ = "D:\buffer_file_Operaciok.txt"
# --------------------------------------------------------------------------
# Szerszám név Buffer - 3
rc3			 : 1
wc3			 : 1
size3		   : 0
fbuf 3 0 255 0 1
sbufname3$ = "D:\buffer_file_SzerszamNevek.txt"
# --------------------------------------------------------------------------
# Szerszám Sík Név Buffer - 4
rc4			 : 1
wc4			 : 1
size4		   : 0
fbuf 4 0 255 0 1
sbufname4$ = "D:\buffer_file_ToolPlaneNev.txt"
# --------------------------------------------------------------------------
# Szerszám Sík Comment Buffer - 5
rc5			 : 1
wc5			 : 1
size5		   : 0
fbuf 5 0 255 0 1
sbufname5$ = "D:\buffer_file_ToolPlaneComment.txt"
# --------------------------------------------------------------------------

#----------------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------------
pToolPlanesRead
 size1 = rbuf(1, 0)
 rc1 = 1
 b1_MaxOffset = -1
 fszamlalo = 0
 szerszam_out = 1
 # Legnagyobb számú Offset/Nullpont megkeresése
    while rc1 <= size1,
    [
	    b1_index = rbuf(1, rc1)
	    if b1_PlaneOffsetNo > b1_MaxOffset, b1_MaxOffset = b1_PlaneOffsetNo
    ]

    size1 = rbuf(1, 0)
 size4 = rbuf(4, 0)
 size5 = rbuf(5, 0)
    rc1 = 1
 rc4 = 1
 rc5 = 1
    "( *** NULLPONTOK *** )", e$
 "()", e$
    # Nullpontok kiírása emelkedő sorrendben
    while fszamlalo <= b1_MaxOffset,
    [
	    while rc1 <= size1,
	    [
		 s_ToolPlaneName = rbuf(4, rc4)
		 s_ToolPlaneComm = rbuf(5, rc5)
		    b1_index = rbuf(1, rc1)
		    if fszamlalo = b1_PlaneOffsetNo,
		    [
			    if szerszam_out = 1,
			    [
				 "(", *b1_PlaneOffsetNo, "->", *s_ToolPlaneName, ")", e$
				 if 0 <> strlen(s_ToolPlaneComm), "( ----->", *s_ToolPlaneComm, ")", e$
				 "()", e$
			    ]
			    szerszam_out = 0
		    ]
	    ]
    fszamlalo = fszamlalo + 1
    rc1 = 1
    rc4 = 1
    rc5 = 1
    szerszam_out = 1
    ]
    "( ****************** )", e$
    "()", e$

pToolTable_NEW  # Új és "intelligens" szerszámlista a program elejére, 1es és 3as buffert használja
 sav_spc = spaces$
 spaces$ = 0
 size1 = rbuf(1, 0)
 rc1 = 1
 b1_MaxTool = -1
 szerszam_out = 1
 # Legnagyobb számú szerszám megkeresése
 while rc1 <= size1,
 [
  b1_index = rbuf(1, rc1)
  if b1_ToolNo > b1_MaxTool, b1_MaxTool = b1_ToolNo
 ]

 size1 = rbuf(1, 0)
 rc1 = 1
 rc3 = 1
 fszamlalo = 0
 # Kiírás emelkedő sorrendben
 while fszamlalo <= b1_MaxTool,
 [
  while rc1 <= size1,
  [
   b1_index = rbuf(1, rc1)
   s_ToolName = rbuf(3, rc3)
   if fszamlalo = b1_ToolNo,
   [
 if szerszam_out = 1, "( ", *b1_ToolNo, pToolNoSpace, ": ", *s_ToolName, pToolCommSpace, " | ", pLenOffsOut, pDiaOffsOut, ")", e$
 szerszam_out = 0
   ]
  ]
 fszamlalo = fszamlalo + 1
 rc1 = 1
 rc3 = 1
 szerszam_out = 1
 ]
 spaces$ = sav_spc

pLenOffsOut  # Szerszámlistába a 'H' értékének a kiírása, ha van több, akkor azt is
 temp_size = rbuf(1, 0)
 temp_counter = 1
 b1_MaxOffset = -1
 szerszam_out = 1
 # Legnagyobb számú "H" offset megkeresése
 while temp_counter <= temp_size,
 [
  b1_index = rbuf(1, temp_counter)
  if b1_ToolLenOffs > b1_MaxOffset, b1_MaxOffset = b1_ToolLenOffs
 ]
 # Kiírás emelkedő sorrendben
 temp_size = rbuf(1, 0)
 temp_counter = 1
 temp_counter_2 = 1
 while temp_counter_2 <= b1_MaxOffset,
 [
  while temp_counter <= temp_size,
  [
   b1_index = rbuf(1, temp_counter)
   if b1_ToolNo = fszamlalo & temp_counter_2 = b1_ToolLenOffs & szerszam_out = 1,
   [
 *b1_ToolLenOffs, sspace
 szerszam_out = 0
   ]
  ]
 szerszam_out = 1
 temp_counter = 1
 temp_counter_2 = temp_counter_2 + 1
 ]

pDiaOffsOut  # Szerszámlistába a 'D' értékének a kiírása, ha van több, akkor azt is, Control/Wear figyelembe véve
 temp_size = rbuf(1, 0)
 temp_counter = 1
 b1_MaxOffset = -1
 szerszam_out = 1
 # Legnagyobb számú "D" offset megkeresése
 while temp_counter <= temp_size,
 [
  b1_index = rbuf(1, temp_counter)
  if b1_ToolDiaOffs > b1_MaxOffset, b1_MaxOffset = b1_ToolDiaOffs
 ]
 # Kiírás emelkedő sorrendben
 temp_size = rbuf(1, 0)
 temp_counter = 1
 temp_counter_2 = 1
 while temp_counter_2 <= b1_MaxOffset,
 [
  while temp_counter <= temp_size,
  [
   b1_index = rbuf(1, temp_counter)
   if b1_ToolNo = fszamlalo & temp_counter_2 = b1_ToolDiaOffs & szerszam_out = 1 & (b1_ToolCompType = 1 | b1_ToolCompType = 2),
   [
 [if delimiter_flag = 0, sdelimiter, sspace], *b1_ToolDiaOffs, [if b1_ToolCompType = 1, "=R"], [if b1_ToolCompType = 2, "=0"], sspace
 szerszam_out = 0
 delimiter_flag = 1
   ]
  ]
 szerszam_out = 1
 temp_counter = 1
 temp_counter_2 = temp_counter_2 + 1
 ]
 delimiter_flag = 0

pToolCommSpace  # Tool comments hosszának a kiegészítése
 temp_counter_2 = strlen(s_ToolName)
 temp_counter = 1
 while temp_counter <= (31 - temp_counter_2),
 [
  " "
  temp_counter = temp_counter + 1
 ]

pToolNoSpace  # Tool number hosszának a kiegészítése
 if b1_ToolNo < 10, " "
 if b1_ToolNo >= 10 & b1_ToolNo < 100, ""
#----------------------------------------------------------------------------------------------------
pWriteBuffer_1   # Szerszám Buffer írása
 b1_ToolNo = abs(t$)
 b1_ToolLenOffs = tlngno$
 b1_ToolDiaOffs = tloffno$
 b1_ToolCompType = comp_type
 b1_OpInteger_10 = mi10$
 b1_PlaneOffsetNo = workofs$
 b1_index = wbuf(1, wc1)
 b1_index = b1_index + 1

pWriteBuffer_2   # Operáció Comment Buffer írása
 s_OpComment = wbuf(2, wc2)

pWriteBuffer_3   # Szerszám név Buffer írása
 s_ToolName = wbuf(3, wc3)

pWriteBuffer_4   # Szerszám Sík Név Buffer írása
    s_ToolPlaneName = wbuf(4, wc4)

pWriteBuffer_5   # Szerszám Sík Comment Buffer írása
    s_ToolPlaneComm = wbuf(5, wc5)

pToolOffsets   # Szerszám Buffer olvasása - hossz/sugár korrekciók figyelése
 size1 = rbuf(1, 0)
 rc1 = 1
 rc2 = 1
 "()", e$
 while rc1 <= size1,
    [
	 b1_index = rbuf(1, rc1)
	 s_OpComment = rbuf(2, rc2)
	 if b1_ToolNo <> b1_ToolLenOffs & b1_ToolNo = b1_ToolDiaOffs,
	 [
	  if megjegyzes_start = 0, pKiemeles_1_start
	  megjegyzes_start = 1
	  megjegyzes_end = 1
	  "( ", pElotag, *s_OpComment, "MUVELET  -->>   )", e$
	  "(	  ", *b1_ToolLenOffs, "HOSSZKORREKCIOT HASZNAL!", "|", *b1_ToolNo, "!!! )", e$
	  "()", e$
	 ]

	 if b1_ToolNo = b1_ToolLenOffs & b1_ToolNo <> b1_ToolDiaOffs & (b1_ToolCompType = 1 | b1_ToolCompType = 2),
	 [
	  if megjegyzes_start = 0, pKiemeles_1_start
	  megjegyzes_start = 1
	  megjegyzes_end = 1
	  "( ", pElotag, *s_OpComment, "MUVELET  -->>   )", e$
	  "(    ", *b1_ToolDiaOffs, "SUGARKORREKCIOT HASZNAL!", "|", *b1_ToolNo, "!!! )", e$
	  "()", e$
	 ]

	 if b1_ToolNo <> b1_ToolLenOffs & b1_ToolNo <> b1_ToolDiaOffs,
	 [
	  if megjegyzes_start = 0, pKiemeles_1_start
	  megjegyzes_start = 1
	  megjegyzes_end = 1
	  if b1_ToolCompType = 1 | b1_ToolCompType = 2,
	  [
	   "( ", pElotag, *s_OpComment, "MUVELET  -->>   )", e$
	   "(    ", *b1_ToolLenOffs, "HOSSZKORREKCIOT", "ES )", e$
	   "(    ", *b1_ToolDiaOffs, "SUGARKORREKCIOT HASZNAL!", "|", *b1_ToolNo, "!!! )", e$
	   "()", e$
	  ]
	  else,
	  [
	   "( ", pElotag, *s_OpComment, "MUVELET  -->>   )", e$
	   "(    ", *b1_ToolLenOffs, "HOSSZKORREKCIOT HASZNAL!", "|", *b1_ToolNo, "!!! )", e$
	   "()", e$
	  ]
	 ]
    ]
    if megjegyzes_end = 1, pKiemeles_1_end
    megjegyzes_start = 0
    megjegyzes_end = 0
    "()", e$

pElotag  # "A" vagy "AZ" beírása az operáció comment elé, a magyar nyelv szabályai szerint... 
 s_passover = ucase(s_OpComment)
 if 1 = strstr("A", s_passover) | 1 = strstr("E", s_passover) | 1 = strstr("I", s_passover) | 1 = strstr("O", s_passover) | 1 = strstr("U", s_passover),
 [
  "AZ"
 ]
 else,
 [
  "A"
 ]

pKiemeles_1_start
 "( ------------------------------------------ )", e$
 "( -------------- FIGYELEM!!! --------------- )", e$
 "()", e$

pKiemeles_1_end
 "( ------------------------------------------ )", e$
 "( ------------------------------------------ )", e$
#----------------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------------

psof$		    #Start of file for non-zero tool number   
  prv_tloffno$ = c9k
  retract_figyeles = 0
  pcuttype
  toolchng = one
  #
  pToolTable_NEW
  pToolOffsets
  pToolPlanesRead
  #

pwrtt$		  #Pre-read NCI file
  # Bufferek írása minden egyes operációnál
  if op_id$ <> prv_op_id$,
   [
   pWriteBuffer_1
   pWriteBuffer_2
   pWriteBuffer_3
   pWriteBuffer_4
   pWriteBuffer_5
   ]
  !op_id$
pwrttparam$	 #Pre-read parameter data
  #"pwrttparam", ~prmcode$, ~sparameter$, e$
  if prmcode$ = 15346, comp_type = rpar(sparameter$, 1) #Cutter compensation type - 0=computer, 1=control, 2=wear, 3=reverse wear, 4=off
  if prmcode$ = 15239, s_OpComment = sparameter$   # Operáció comment
  if prmcode$ = 20001, s_ToolName = sparameter$   # Aktuláis szerszám neve
  if prmcode$ = 20012, s_ToolPlaneName = ucase(sparameter$) # Aktuális Szerszám Sík Neve
  if prmcode$ = 20013, s_ToolPlaneComm = ucase(sparameter$) # Aktuális Szerszám Sík Commentje

  • Like 2
Link to comment
Share on other sites

OK, let's see the final solution.

It put the toollist in ascending order, and put the CompType after the tool, if one of them are switched on.

(OFF/CONTROLL/COMPUTER/WEAR/REVERSEWEAR)

Also shows an error message -as John suggested- to warn the programmer if the same tool use different CompType

in different operations. I.e.: CONTROL and WEAR (or REVERSE)

 

Variables, Formats, Buffers. Definiton,

 

#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# Define of Tool Buffers and variables - MoP
#--------------------------------------------------------------------------
# Tracking switches/questions of Cutter Compensation
Print_Computer : no$ # Track & Print Computer compensation?
Print_Control : yes$ # Track & Print Control compensation?
Print_Wear : yes$ # Track & Print Wear compensation?
Print_Reverse : no$ # Track & Print Reverese Wear compensation?
Print_CompOff : no$ # Track & Print Compensation Off?
# Tool list varibles (not switches!)
b5_MaxTool : 0 # Buffer 5 max "T" variable
szerszam_out : 0 # Tool is already writen to NC code - flag
fszamlalo : 0 # Counter (szamlalo = counter in hungarian 
temp_counter : 0 # Counter
temp_size : 0 # Counter
Tool_Computer : 0 # Flag
Tool_Control : 0 # Flag
Tool_Wear : 0 # Flag
Tool_Reverse : 0 # Flag
Tool_CompOff : 0 # Flag
CompWord : 0 # Flag
ToolCompType : 0 # Tool Compensatinon value for error message
sToolString : ""
sToolCompError : ""
sToolCompErr_1 : "WARNING!!! TOOL >>> T"
sToolCompErr_2 : " <<< USE 2 DIFFERENT COMPENSATION!!!"
# String buffer variables
s_ToolName : "" # Tool Name Buffer string
# --------------------------------------------------------------------------
# Tool Buffer - 5 Definition
b5_index		 : 1	 # Buffer 5 - Buffer Index
b5_ToolNo		 : 0	 # Buffer 5 - Tool Number
b5_ToolLenOffs	 : 0	 # Buffer 5 - Tool LengtOffset
b5_ToolDiaOffs	 : 0	 # Buffer 5 - Tool DiaOffset
b5_ToolCompType	 : 0	 # Buffer 5 - Tool Comp Type - 0=Computer, 1=Control, 2=Wear, 3=Reverse Wear, 4=Off
rc5				 : 1
wc5				 : 1
size5			 : 0
fbuf 5 0 5 0 0
# If you want to look into and keep this buffer on HDD as a text file
# then specify a name and a full path like below
# AND change the buffer definition parameters to: fbuf 5 1 5 0 0
sbufname5$ = "D:\buffer_file_ToolParameters.txt"
# --------------------------------------------------------------------------
# Tool Name Buffer - 6 Definition
rc6			 : 1
wc6			 : 1
size6		 : 0
fbuf 6 0 255 0 1
# If you want to look into and keep this buffer on HDD as a text file
# then specify a name and a full path like below
# AND change the buffer definition parameters to: fbuf 6 1 255 0 0
sbufname6$ = "D:\buffer_file_ToolNames.txt"
#--------------------------------------------------------------------------
# Format of Tool List variables
fmt T 4 b5_ToolNo		 # Buffer 5 - Tool Number
fmt H 4 b5_ToolLenOffs	 # Buffer 5 - Tool LengtOffset
fmt D 4 b5_ToolDiaOffs	 # Buffer 5 - Tool DiaOffset
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------

 

 

Postblocks to Read/Write buffers and create toollist:

 

#--------------------------------------------------------------------------
# Write and Read Buffer 5/6 - MoP
#--------------------------------------------------------------------------
pWriteBuffer_5 # Write Tool Buffer at every opertion (@ pre-read)
b5_ToolNo = abs(t$)
b5_ToolLenOffs = tlngno$
b5_ToolDiaOffs = tloffno$
b5_ToolCompType = comp_type
b5_index = wbuf(5, wc5)
b5_index = b5_index + 1

pWriteBuffer_6 # Write Tool Name Buffer at every opertion (@ pre-read)
s_ToolName = wbuf(6, wc6)

pToolTable_NEW # Writes a standalone ToolList
sav_spc = spaces$
spaces$ = 1
size5 = rbuf(5, 0) # Find & Set the maximum size of Buffer 5
rc5 = 1
b5_MaxTool = -1
szerszam_out = 1
# Find The maximum/biggest "T" number in Buffer5
while rc5 <= size5,
[
b5_index = rbuf(5, rc5)
if b5_ToolNo > b5_MaxTool, b5_MaxTool = b5_ToolNo
]

size5 = rbuf(5, 0)
rc5 = 1
rc6 = 1
fszamlalo = 0
# Start to write the tools in ascending order
while fszamlalo <= b5_MaxTool, # We start from zero toolnumber to the biggest toolnumber, because of ascending order
[
while rc5 <= size5, # Loop to find a tool in Buffer5 by number
[
b5_index = rbuf(5, rc5)
s_ToolName = rbuf(6, rc6) # We set the s_ToolName string to the actual toolname
if fszamlalo = b5_ToolNo,
[
 if szerszam_out = 1, "(", *b5_ToolNo, ":", *s_ToolName, pCutCompOut, ")", e$ # write Tool into NC code, and call pCutCompOut postblock
 szerszam_out = 0 # we use this flag to write a tool only once into ToolList
]
]
fszamlalo = fszamlalo + 1
rc5 = 1
rc6 = 1
szerszam_out = 1
]
spaces$ = sav_spc

pCutCompOut # Write Cutter Compensation of actual tool (fszamlalo hold it, from pToolTable_NEW postblock, that s the "caller" postblock)
sav_spc = spaces$
spaces$ = 0
temp_size = rbuf(5, 0)
temp_counter = 1
# We go through again on Tool Buffer5 and look every occurrences of actual Tool
while temp_counter <= temp_size,
[
b5_index = rbuf(5, temp_counter)
if b5_ToolNo = fszamlalo, # If we find an occurrence, we check that we need to print it (once) and check CompTypes
[
 if (Print_Computer & b5_ToolCompType = 0) | (Print_Control & b5_ToolCompType = 1) | (Print_Wear & b5_ToolCompType = 2)
 | (Print_Reverse & b5_ToolCompType = 3) | (Print_CompOff & b5_ToolCompType = 4),
 [
 if CompWord = 0, [", Comp:", CompWord = 1] # We write "Comp:" word into NC code, but only ONE time, that's why we use "CompWord" flag
 ]
 #
 # Handling if Tool has 2 different comp_type in differebt operations
 # We look for Control/Wear/Reverse Wear only
 # The first "match" is the real one, others goes to error message
 sToolString = no2str(b5_ToolNo)
 sToolCompError = sToolCompErr_1 + sToolString + sToolCompErr_2
 # Error @ not CONTROL
 if ToolCompType = 1 & (b5_ToolCompType = 2 | b5_ToolCompType = 3), result = mprint(sToolCompError)
 # Error @ not WEAR
 if ToolCompType = 2 & (b5_ToolCompType = 1 | b5_ToolCompType = 3), result = mprint(sToolCompError)
 # Error @ not REVERSE WEAR
 if ToolCompType = 3 & (b5_ToolCompType = 1 | b5_ToolCompType = 2), result = mprint(sToolCompError)
 #
 if Print_Computer & b5_ToolCompType = 0 & Tool_Computer = 0, [" COMPUTER", Tool_Computer = 1]	 # write COMPUTER
 if Print_Control & b5_ToolCompType = 1 & Tool_Control = 0, [" CONTROL", Tool_Control = 1, ToolCompType = 1] # write CONTROL
 if Print_Wear & b5_ToolCompType = 2 & Tool_Wear = 0, [" WEAR", Tool_Wear = 1, ToolCompType = 2]	 # write WEAR
 if Print_Reverse & b5_ToolCompType = 3 & Tool_Reverse = 0, [" REVERSE WEAR", Tool_Reverse = 1, ToolCompType = 3] # write REVERSE
 if Print_CompOff & b5_ToolCompType = 4 & Tool_CompOff = 0, [" OFF", Tool_CompOff = 1]	 # write OFF
]
]
# Set flags to zero for next tool
Tool_Computer = 0
Tool_Control = 0
Tool_Wear = 0
Tool_Reverse = 0
Tool_CompOff = 0
CompWord = 0
ToolCompType = 0
spaces$ = sav_spc

#--------------------------------------------------------------------------
#--------------------------------------------------------------------------

 

 

Postblocks with mods:

 

psof$		 #Start of file for non-zero tool number			
 pcuttype
 toolchng = one
 if ntools$ = one,
 [
 #skip single tool outputs, stagetool must be on
 stagetool = m_one
 ]
#
# MoP
#
"()", e$
"()", e$
"( TOOL LIST: )", e$
#
pToolTable_NEW
#
"()", e$
"()", e$
#
#


pwrtt$		 #Pre-read NCI file
 #if tool_info > 1 & t$ > 0 & gcode$ <> 1003, ptooltable # Line commented by MoP, we don't need this, beacuse we have another list
 #
 # changes by MoP
 #
 # We will go trough on ALL operation at Pre-Read of NCI file
 # ...and write buffers at every operation
 if op_id$ <> prv_op_id$,
 [
 pWriteBuffer_5 # Tool Buffer 5, Number, Offsets and actual Compensation of operation
 pWriteBuffer_6 # Tool Name Buffer 6, it's a string buffer
 ]
 !op_id$


pwrttparam$	 #Pre-read parameter data
 #"pwrttparam", ~prmcode$, ~sparameter$, e$
 # You must add both line below to capture ToolName and Compenstion from operations
 if prmcode$ = 15346, comp_type = rpar(sparameter$, 1) #Cutter compensation type - 0=computer, 1=control, 2=wear, 3=reverse wear, 4=off
 if prmcode$ = 20001, s_ToolName = sparameter$ # Capture Tool Name - MoP

 

 

 

 

:pc::coffee:

Link to comment
Share on other sites
  • 9 months later...

Thank you for posting this back up. I have been working on this same issue for sometime with a post. I seen an example of a header I like that someone did by hand and I wanted it for the posts and have been fighting for a month to figure it out. I am still not there, but this is good information to hopefully help me figure it out.

Link to comment
Share on other sites

Okay, I found that this sample not shows "Reverse Wear" comp type (what is that BTW?) and it not shows

if in a pocket operation the Finish pass is switched on with any cutter comp.

May be someone use RevWear I'm not really, that's why it's not in, but sholud be helpful to catch programming errors. Just an example.

 

I'm working on an update, but today I ran into a possible bug in 2D HSM Peel Mill operation.

I'll back soon.

Link to comment
Share on other sites

we use reverse wear here :/

 

What is that for really? What is the case, when it's useful? Benefits? I'm just interested.

 

BTW, do you need modification to catch RevWear?

 

 

N.100 post! :D:guitar::fun::laughing:

 

In my #11 post here, those solution containts everything, including RevWear.... :turned:

But in my first post and in my sample file in my PC, so that has a buggyyy... Grrr.... :wallbash:

Sorry for confusion! :on2long:

Link to comment
Share on other sites
  • 5 years later...
On 12/12/2012 at 6:04 PM, Peter - NCS Ltd. said:

OK, let's see the final solution.

It put the toollist in ascending order, and put the CompType after the tool, if one of them are switched on.

(OFF/CONTROLL/COMPUTER/WEAR/REVERSEWEAR)

Also shows an error message -as John suggested- to warn the programmer if the same tool use different CompType

in different operations. I.e.: CONTROL and WEAR (or REVERSE)

 

Variables, Formats, Buffers. Definiton,

 

 

#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# Define of Tool Buffers and variables - MoP
#--------------------------------------------------------------------------
# Tracking switches/questions of Cutter Compensation
Print_Computer : no$ # Track & Print Computer compensation?
Print_Control : yes$ # Track & Print Control compensation?
Print_Wear : yes$ # Track & Print Wear compensation?
Print_Reverse : no$ # Track & Print Reverese Wear compensation?
Print_CompOff : no$ # Track & Print Compensation Off?
# Tool list varibles (not switches!)
b5_MaxTool : 0 # Buffer 5 max "T" variable
szerszam_out : 0 # Tool is already writen to NC code - flag
fszamlalo : 0 # Counter (szamlalo = counter in hungarian 
temp_counter : 0 # Counter
temp_size : 0 # Counter
Tool_Computer : 0 # Flag
Tool_Control : 0 # Flag
Tool_Wear : 0 # Flag
Tool_Reverse : 0 # Flag
Tool_CompOff : 0 # Flag
CompWord : 0 # Flag
ToolCompType : 0 # Tool Compensatinon value for error message
sToolString : ""
sToolCompError : ""
sToolCompErr_1 : "WARNING!!! TOOL >>> T"
sToolCompErr_2 : " <<< USE 2 DIFFERENT COMPENSATION!!!"
# String buffer variables
s_ToolName : "" # Tool Name Buffer string
# --------------------------------------------------------------------------
# Tool Buffer - 5 Definition
b5_index		 : 1	 # Buffer 5 - Buffer Index
b5_ToolNo		 : 0	 # Buffer 5 - Tool Number
b5_ToolLenOffs	 : 0	 # Buffer 5 - Tool LengtOffset
b5_ToolDiaOffs	 : 0	 # Buffer 5 - Tool DiaOffset
b5_ToolCompType	 : 0	 # Buffer 5 - Tool Comp Type - 0=Computer, 1=Control, 2=Wear, 3=Reverse Wear, 4=Off
rc5				 : 1
wc5				 : 1
size5			 : 0
fbuf 5 0 5 0 0
# If you want to look into and keep this buffer on HDD as a text file
# then specify a name and a full path like below
# AND change the buffer definition parameters to: fbuf 5 1 5 0 0
sbufname5$ = "D:\buffer_file_ToolParameters.txt"
# --------------------------------------------------------------------------
# Tool Name Buffer - 6 Definition
rc6			 : 1
wc6			 : 1
size6		 : 0
fbuf 6 0 255 0 1
# If you want to look into and keep this buffer on HDD as a text file
# then specify a name and a full path like below
# AND change the buffer definition parameters to: fbuf 6 1 255 0 0
sbufname6$ = "D:\buffer_file_ToolNames.txt"
#--------------------------------------------------------------------------
# Format of Tool List variables
fmt T 4 b5_ToolNo		 # Buffer 5 - Tool Number
fmt H 4 b5_ToolLenOffs	 # Buffer 5 - Tool LengtOffset
fmt D 4 b5_ToolDiaOffs	 # Buffer 5 - Tool DiaOffset
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
 

 

 

 

Postblocks to Read/Write buffers and create toollist:

 

 

#--------------------------------------------------------------------------
# Write and Read Buffer 5/6 - MoP
#--------------------------------------------------------------------------
pWriteBuffer_5 # Write Tool Buffer at every opertion (@ pre-read)
b5_ToolNo = abs(t$)
b5_ToolLenOffs = tlngno$
b5_ToolDiaOffs = tloffno$
b5_ToolCompType = comp_type
b5_index = wbuf(5, wc5)
b5_index = b5_index + 1

pWriteBuffer_6 # Write Tool Name Buffer at every opertion (@ pre-read)
s_ToolName = wbuf(6, wc6)

pToolTable_NEW # Writes a standalone ToolList
sav_spc = spaces$
spaces$ = 1
size5 = rbuf(5, 0) # Find & Set the maximum size of Buffer 5
rc5 = 1
b5_MaxTool = -1
szerszam_out = 1
# Find The maximum/biggest "T" number in Buffer5
while rc5 <= size5,
[
b5_index = rbuf(5, rc5)
if b5_ToolNo > b5_MaxTool, b5_MaxTool = b5_ToolNo
]

size5 = rbuf(5, 0)
rc5 = 1
rc6 = 1
fszamlalo = 0
# Start to write the tools in ascending order
while fszamlalo <= b5_MaxTool, # We start from zero toolnumber to the biggest toolnumber, because of ascending order
[
while rc5 <= size5, # Loop to find a tool in Buffer5 by number
[
b5_index = rbuf(5, rc5)
s_ToolName = rbuf(6, rc6) # We set the s_ToolName string to the actual toolname
if fszamlalo = b5_ToolNo,
[
 if szerszam_out = 1, "(", *b5_ToolNo, ":", *s_ToolName, pCutCompOut, ")", e$ # write Tool into NC code, and call pCutCompOut postblock
 szerszam_out = 0 # we use this flag to write a tool only once into ToolList
]
]
fszamlalo = fszamlalo + 1
rc5 = 1
rc6 = 1
szerszam_out = 1
]
spaces$ = sav_spc

pCutCompOut # Write Cutter Compensation of actual tool (fszamlalo hold it, from pToolTable_NEW postblock, that s the "caller" postblock)
sav_spc = spaces$
spaces$ = 0
temp_size = rbuf(5, 0)
temp_counter = 1
# We go through again on Tool Buffer5 and look every occurrences of actual Tool
while temp_counter <= temp_size,
[
b5_index = rbuf(5, temp_counter)
if b5_ToolNo = fszamlalo, # If we find an occurrence, we check that we need to print it (once) and check CompTypes
[
 if (Print_Computer & b5_ToolCompType = 0) | (Print_Control & b5_ToolCompType = 1) | (Print_Wear & b5_ToolCompType = 2)
 | (Print_Reverse & b5_ToolCompType = 3) | (Print_CompOff & b5_ToolCompType = 4),
 [
 if CompWord = 0, [", Comp:", CompWord = 1] # We write "Comp:" word into NC code, but only ONE time, that's why we use "CompWord" flag
 ]
 #
 # Handling if Tool has 2 different comp_type in differebt operations
 # We look for Control/Wear/Reverse Wear only
 # The first "match" is the real one, others goes to error message
 sToolString = no2str(b5_ToolNo)
 sToolCompError = sToolCompErr_1 + sToolString + sToolCompErr_2
 # Error @ not CONTROL
 if ToolCompType = 1 & (b5_ToolCompType = 2 | b5_ToolCompType = 3), result = mprint(sToolCompError)
 # Error @ not WEAR
 if ToolCompType = 2 & (b5_ToolCompType = 1 | b5_ToolCompType = 3), result = mprint(sToolCompError)
 # Error @ not REVERSE WEAR
 if ToolCompType = 3 & (b5_ToolCompType = 1 | b5_ToolCompType = 2), result = mprint(sToolCompError)
 #
 if Print_Computer & b5_ToolCompType = 0 & Tool_Computer = 0, [" COMPUTER", Tool_Computer = 1]	 # write COMPUTER
 if Print_Control & b5_ToolCompType = 1 & Tool_Control = 0, [" CONTROL", Tool_Control = 1, ToolCompType = 1] # write CONTROL
 if Print_Wear & b5_ToolCompType = 2 & Tool_Wear = 0, [" WEAR", Tool_Wear = 1, ToolCompType = 2]	 # write WEAR
 if Print_Reverse & b5_ToolCompType = 3 & Tool_Reverse = 0, [" REVERSE WEAR", Tool_Reverse = 1, ToolCompType = 3] # write REVERSE
 if Print_CompOff & b5_ToolCompType = 4 & Tool_CompOff = 0, [" OFF", Tool_CompOff = 1]	 # write OFF
]
]
# Set flags to zero for next tool
Tool_Computer = 0
Tool_Control = 0
Tool_Wear = 0
Tool_Reverse = 0
Tool_CompOff = 0
CompWord = 0
ToolCompType = 0
spaces$ = sav_spc

#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
 

 

 

 

Postblocks with mods:

 

 

psof$		 #Start of file for non-zero tool number			
 pcuttype
 toolchng = one
 if ntools$ = one,
 [
 #skip single tool outputs, stagetool must be on
 stagetool = m_one
 ]
#
# MoP
#
"()", e$
"()", e$
"( TOOL LIST: )", e$
#
pToolTable_NEW
#
"()", e$
"()", e$
#
#


pwrtt$		 #Pre-read NCI file
 #if tool_info > 1 & t$ > 0 & gcode$ <> 1003, ptooltable # Line commented by MoP, we don't need this, beacuse we have another list
 #
 # changes by MoP
 #
 # We will go trough on ALL operation at Pre-Read of NCI file
 # ...and write buffers at every operation
 if op_id$ <> prv_op_id$,
 [
 pWriteBuffer_5 # Tool Buffer 5, Number, Offsets and actual Compensation of operation
 pWriteBuffer_6 # Tool Name Buffer 6, it's a string buffer
 ]
 !op_id$


pwrttparam$	 #Pre-read parameter data
 #"pwrttparam", ~prmcode$, ~sparameter$, e$
 # You must add both line below to capture ToolName and Compenstion from operations
 if prmcode$ = 15346, comp_type = rpar(sparameter$, 1) #Cutter compensation type - 0=computer, 1=control, 2=wear, 3=reverse wear, 4=off
 if prmcode$ = 20001, s_ToolName = sparameter$ # Capture Tool Name - MoP

Perfect!
 
If  I want to output tool diameter, How to get it ?😉
 

 

 

 

 

 

:pc::coffee:

 

Link to comment
Share on other sites
33 minutes ago, jeff.D said:

If you use Mastercam 2017 or later, there is a much better (easier/cleaner/faster) way to do this. 

I would recommend you explore the new options CNC Software has introduced before implementing the code snippet in this thread.

Hi,Jeff,

       Thanks,I will study 2017 .

 

Link to comment
Share on other sites
16 hours ago, jeff.D said:

If you use Mastercam 2017 or later, there is a much better (easier/cleaner/faster) way to do this. 

I would recommend you explore the new options CNC Software has introduced before implementing the code snippet in this thread.

Yepp, my original post is from 2012. Mastercam X7, I think.

 

15 hours ago, opcode said:

Hi,Jeff,

       Thanks,I will study 2017 .

 

Go for 2019 if you can. See my next post here:

Link to comment
Share on other sites

Mastercam 2019 tooltable, using x_tooltable$ function, buffers, stacks and postblocks with parameters.

 

Region of buffer, stack and variables declaration:

#region Buffers and variables for new tooltable
#--------------------------------------------------------------------------
# Buffer - 1 TOOL DATA BUFFER
#--------------------------------------------------------------------------
b1_Index            : 1     # Buffer 1 - Index
b1_ToolNo           : 0     # Buffer 1 - Tool number
b1_ToolDia            : 0        # Tool diameter
b1_ToolCornerRad    : 0        # Tool corner radius
b1_ToolTipAngle        : 0        # Tool tip angle
b1_ToolType            : 0        # Tool type (mill, drill)
b1_ToolStickOut        : 0        # Tool stickout from holder
b1_ToolLenOffs      : 0     # Buffer 1 - Tool length offset
b1_ToolDiaOffs      : 0     # Buffer 1 - Tool diameter offset
b1_ToolCompType     : 0     # Buffer 1 - Cutter compensation - 0=Computer, 1=Control, 2=Wear, 3=Reverse Wear, 4=Off
b1_PlaneOffsetNo    : 0        # Buffer 1 - Tool plane number
b1_Zmax                : 0        # Buffer 1 - Tool Z maximum value by operation
b1_Zmin                : 0        # Buffer 1 - Tool Z minimum value by operation
rc1                 : 1
wc1                 : 1
size1               : 0
fbuf 1 0 13 0 0
sbufname1$ = "D:\buffer_file_ToolData.txt"

# --------------------------------------------------------------------------
# Buffer - 3 TOOL NAME
# --------------------------------------------------------------------------
rc3             : 1
wc3             : 1
size3           : 0
fbuf 3 0 255 0 1
sbufname3$ = "D:\buffer_file_ToolName.txt"


# TooNumber follow up stack #1
t_1    : 0            # first field in record
fstack 1 1 0      # define stack #1 with 1 field per record

# LengthOffset follow up stack #2
h_1    : 0            # first field in record
fstack 2 1 0      # define stack #2 with 1 field per record

# DiameterOffset follow up stack #3
d_1    : 0            # first field in record
fstack 3 1 0      # define stack #3 with 1 field per record


# --------------------------------------------------------------------------
s_ToolName        : ""
fszamlalo        : 0
b1_MaxZout        : 0
b1_MinZout        : 0
temp_size        : 0
temp_s_size        : 0
temp_counter    : 0
temp_s_counter    : 0
temp_counter_2    : 0
prev_ToolNumber    : 0
ToolOut            : yes$
OffsOut            : yes$
FirstOffs        : yes$
sspace            : " "
separatorline    : "---------------------------------------------------------"

fmt    "T"        4    b1_ToolNo
fmt    "H"        4    b1_ToolLenOffs
fmt    "D"        4    b1_ToolDiaOffs
fmt    "Zmax:"    2    b1_MaxZout
fmt    "Zmin:"    2    b1_MinZout
fmt    "Dia:"    2    b1_ToolDia
fmt    "Rad:"    2    b1_ToolCornerRad
fmt    "L:"    2    b1_ToolStickOut
fmt    "Ang:"    2    b1_ToolTipAngle
#endregion

 

Region of al tooltable postblocks:

#region NEW Tool table output
# --------------------------------------------------------------------------
# Tool Table
# --------------------------------------------------------------------------
ptooltable$
        #
        b1_ToolNo = tt_tool$
        sparameter$ = opinfo(1013, 0)
        b1_ToolDia = rparsngl(sparameter$, 2)
        b1_ToolCornerRad = rparsngl(sparameter$, 3)
        sparameter$ = opinfo(20007, 0)
        b1_ToolStickOut = rparsngl(sparameter$, 12)
        b1_ToolLenOffs = tt_tlngno$
        sparameter$ = opinfo(20004, 0)
        b1_ToolType = rparsngl(sparameter$, 2)
        b1_ToolTipAngle = rparsngl(sparameter$, 8)
        b1_ToolDiaOffs = tt_offset$
        b1_ToolCompType = tt_cc_pos$
        b1_PlaneOffsetNo = tt_workoffs$
        b1_Zmax = z_max$
        b1_Zmin = z_min$
        b1_Index = wbuf(one, wc1)
        b1_Index = b1_Index + one
        #
        if opinfo(20001, 0) <> -99999, s_ToolName = opinfo(20001, zero)
        s_ToolName = wbuf(three, wc3)
        #


pToolTable_NEW
        size1 = rbuf(one, zero)
        rc1 = one
        rc3 = one
        prev_ToolNumber = m_one
        #
        no_spc$, sopen_prn, no_spc$, separatorline, no_spc$, sclose_prn, e$
        #
        #Write tool table
        while rc1 <= size1,
        [
            b1_Index = rbuf(one, rc1)
            s_ToolName = rbuf(three, rc3)
            #
            #Check tool output (toolnumber in stack)
            pCheckToolInList(b1_ToolNo, !ToolOut)
            #
            if ToolOut,
            [
                if b1_ToolType > 9, no_spc$, sopen_prn, *b1_ToolNo, pToolNoSpace, no_spc$, ":", *s_ToolName, pToolCommSpace, *b1_ToolDia,
                            pCornRadOut(b1_ToolCornerRad), pZminOut(b1_ToolNo, rc1), pAllHOut(b1_ToolNo, rc1), pAllDOut(b1_ToolNo, rc1), sclose_prn, e$
                else, no_spc$, sopen_prn, *b1_ToolNo, pToolNoSpace, no_spc$, ":", *s_ToolName, pToolCommSpace, *b1_ToolDia,
                            pZminOut(b1_ToolNo, rc1), pAllHOut(b1_ToolNo, rc1), pAllDOut(b1_ToolNo, rc1), sclose_prn, e$
                #Put toolnumber into #1 stack
                t_1 = b1_ToolNo
                t_1 = push(one, result)
            ]
        ]
        #
        no_spc$, sopen_prn, no_spc$, separatorline, no_spc$, sclose_prn, e$


pCheckToolInList(ToolNo, OutPutTool)
        temp_size = pop(one, result, zero)
        temp_counter = one
        OutPutTool = yes$
        #
        while temp_counter <= temp_size,
        [
            t_1 = pop(one, temp_counter, five)
            if ToolNo = t_1, [OutPutTool = no$, temp_counter = c9k]
            temp_counter = temp_counter + one
        ]


pZminOut(ToolNo, ResetCounter)
        temp_size = rbuf(one, zero)
        temp_counter = one
        b1_MinZout = c9k
        #
        while temp_counter <= temp_size,
        [
            b1_Index = rbuf(one, temp_counter)
            if ToolNo = b1_ToolNo, if b1_MinZout > b1_Zmin, b1_MinZout = b1_Zmin
        ]
        #
        *b1_MinZout
        #
        #Reset buffer values by re-read them:
        b1_Index = rbuf(one, (ResetCounter - one))


pAllHOut(ToolNo, ResetCounter)
        temp_size = rbuf(one, zero)
        result = pop(two, m_one, four)
        temp_counter = one
        FirstOffs = yes$
        #
        sdelimiter,
        #
        while temp_counter <= temp_size,
        [
            b1_Index = rbuf(one, temp_counter)
            if ToolNo = b1_ToolNo,
            [
                pCheckStack(b1_ToolLenOffs, two, !OffsOut)
                #
                if not(OffsOut),
                [
                    if not(FirstOffs), [no_spc$, ","]
                    #
                    *b1_ToolLenOffs,
                    #
                    h_1 = b1_ToolLenOffs
                    h_1 = push(two, result)
                    FirstOffs = no$
                ]
            ]
        ]
        #Reset buffer values by re-read them:
        b1_Index = rbuf(one, (ResetCounter - one))


pAllDOut(ToolNo, ResetCounter)
        temp_size = rbuf(one, zero)
        result = pop(three, m_one, four)
        temp_counter = one
        FirstOffs = yes$
        #
        while temp_counter <= temp_size,
        [
            b1_Index = rbuf(one, temp_counter)
            if ToolNo = b1_ToolNo & b1_ToolCompType > zero,
            [
                pCheckStack(b1_ToolDiaOffs, three, !OffsOut)
                #
                if not(OffsOut),
                [
                    if FirstOffs, sdelimiter
                    if not(FirstOffs), [no_spc$, ","]
                    #
                    *b1_ToolDiaOffs,
                    #
                    d_1 = b1_ToolDiaOffs
                    d_1 = push(three, result)
                    FirstOffs = no$
                ]
            ]
        ]
        #Reset buffer values by re-read them:
        b1_Index = rbuf(one, (ResetCounter - one))


pCheckStack(OffsNo, StackNo, StackValue)
        temp_s_size = pop(StackNo, result, zero)
        temp_s_counter = one
        StackValue = no$
        #
        while temp_s_counter <= temp_s_size,
        [
            result = pop(StackNo, temp_s_counter, five)
            if OffsNo = result, [StackValue = yes$, temp_s_counter = c9k]
            temp_s_counter = temp_s_counter + one
        ]


pZmaxOut(ToolNo, ResetCounter)
        temp_size = rbuf(one, zero)
        temp_counter = one
        b1_MaxZout = c9k * m_one
        #
        while temp_counter <= temp_size,
        [
            b1_Index = rbuf(one, temp_counter)
            if ToolNo = b1_ToolNo, if b1_MaxZout < b1_Zmax, b1_MaxZout = b1_Zmax
        ]
        #
        *b1_MaxZout
        #
        #Reset buffer values by re-read them:
        b1_Index = rbuf(one, (ResetCounter - one))


pCornRadOut(Rad)
        if Rad > zero, *b1_ToolCornerRad


pToolNoSpace
        sav_spc = spaces$
        spaces$ = zero
        if b1_ToolNo < 10, sspace
        spaces$ = sav_spc


pToolCommSpace
        sav_spc = spaces$
        spaces$ = zero
        temp_counter_2 = strlen(s_ToolName)
        temp_counter = one
        while temp_counter <= (30 - temp_counter_2),
        [
            sspace
            temp_counter = temp_counter + one
        ]
        spaces$ = sav_spc
        sdelimiter

#endregion

 

Add these lines to pheader$ postblock:

pheader$         #Call before start of file
      x_tooltable$ = one
      x_tooltable$
      pToolTable_NEW
    

 

  • Like 2
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

×   Your link has been automatically embedded.   Display as a link instead

 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

×