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:

Cycle time ?


Recommended Posts

Cycle Time list by OP or Tool

 

:pc:

 

Some additional variable:

# --- Operation/Tool Time variables ---
OpTime_F : 0 # Operation Feed Time
OpTime_R : 0 # Operation Rapid Time
OpLength_F : 0 # Operation Feed Length
OpLength_R : 0 # Operation Rapid Length
ToolTime_F : 0 # Tool Feed Time
ToolTime_R : 0 # Tool Rapid Time
ToolLength_F : 0 # Tool Feed Length
ToolLength_R : 0 # Tool Rapid Length
OpLastOp_id : 0 # OP tracking ID
b10_MaxTool : 0 # Buffer 10 - Biggest tool no in B10
szerszam_out : 0 # Tool flag
temp_counter : 0 # Counter
sav_ToolName : "" # Save Tool name @ Buffer read

fmt 2 ToolLength_F "mm" # Tool Feed Length
fmt 2 ToolLength_R "mm" # Tool Rapid Length


# String bufferek változói
s_OpComment     : ""    # Operáció comment buffer stringje
s_ToolName      : ""    # Szerszám név buffer stringje

 

 

Buffers to hold ToolName, OpName Toolpath time/length

# --------------------------------------------------------------------------
# OP Comment Buffer - 2
rc2			 : 1
wc2			 : 1
size2		 : 0
fbuf 2 0 255 0 1

# --------------------------------------------------------------------------
# ToolName Buffer - 3
rc3			 : 1
wc3			 : 1
size3		 : 0
fbuf 3 0 255 0 1

# --------------------------------------------------------------------------
# Operation Time Buffer - 10
b10_index : 1	 # Buffer 10 - Index
b10_ToolNo : 0	 # Buffer 10 TlNo
b10_ToolTime_F : 0	 # Buffer 10 - Tool Time - FEED
b10_ToolTime_R : 0	 # Buffer 10 - Tool Time - RAPID
b10_Length_F : 0	 # Buffer 10 - Tool Path - FEED
b10_Length_R : 0	 # Buffer 10 - Tool Path - RAPID
rc10 : 1
wc10 : 1
size10 : 0
fbuf 10 0 6 0 0

fmt "T" 4 b10_ToolNo		 # Buffer 10
# --------------------------------------------------------------------------

 

 

Need some changes in basic time postblocks:

ptimer		 #Rapid time and length calc
 rlen = rlen + len		 #Running total RAPID length
 trtime = rlen / pst_rpd_fr$ #Running total RAPID time
 OpTime_R = rlen / pst_rpd_fr$ # Added for Operation Time Counter
 OpLength_R = OpLength_R + len # Added for Operation Length Counter

ptimel		 #Feed time and length calc
 llen = llen + len
 tltime = tltime + len / fr_pos$
 OpTime_F = OpTime_F + len / fr_pos$ # Added for Operation Time Counter
 OpLength_F = OpLength_F + len # Added for Operation Length Counter

 

 

Postblock to write buffers:

pWriteBuffer_2
 s_OpComment = wbuf(2, wc2)

pWriteBuffer_3
 s_ToolName = wbuf(3, wc3)

pWriteBuffer_10 # Time Buffer
 b10_ToolNo = abs(prv_t$)
 b10_ToolTime_F = OpTime_F
 b10_ToolTime_R = OpTime_R
 b10_Length_F = OpLength_F
 b10_Length_R = OpLength_R
 b10_index = wbuf(10, wc10)
 b10_index = b10_index + 1
 OpTime_F = 0 # Reset FEED Time counter @ Op end
 OpTime_R = 0 # Reset RAPID Time counter @ Op end
 OpLength_F = 0 # Reset FEED Length counter @ Op end
 OpLength_R = 0 # Reset RAPID Length counter @ Op end

 

 

Changes to call buffer write postblocks:

pheader$		 #Call before start of file uj fejlec hozzaadva
 #q1,
 rd_tlpathgrp$
 "%", e$
 *progno$, sopen_prn, *sprogname$, *sextnc$, sclose_prn, e$
 "()", e$
 #comment$
 "()", e$
 sopen_prn, "Tool List:" , sclose_prn, e$
...
...
...
 # MoP
 OpLastOp_id = op_id$
 #

ptlchg1002$ #Call at actual toolchange, end last path here
...
...
...
!op_id$
#
if op_id$ <> OpLastOp_id,
[
pWriteBuffer_10
OpLastOp_id = op_id$
]
#

peof$ #End of file for non-zero tool
pretract
pWriteBuffer_10
comment$
if stagetool = 1 & stagetltype = 2, pbld, n$, *first_tool$, e$
n$, "M30", e$
#mergesub$
#clearsub$
...
...
...

pwrtt$ #Pre-read NCI file
if op_id$ <> prv_op_id$,
[
pWriteBuffer_2
pWriteBuffer_3
]
!op_id$

pwrttparam$     #Pre-read parameter data
     #"pwrttparam", ~prmcode$, ~sparameter$, e$
     if prmcode$ = 15239, s_OpComment = sparameter$   # Operáció comment
     if prmcode$ = 20001, s_ToolName = sparameter$   # Aktuláis szerszám neve

 

 

Postblocks to read buffers and create lists:

pReadBuffer_10_2
"( ************** Operation Time/Path *************** )", e$
 size10 = rbuf(10, 0)
 rc2 = 1
 rc10 = 1
 while rc10 <= size10,
 [
	 s_OpComment = rbuf(2, rc2)
	 b10_index = rbuf(10, rc10)
	 ttltime = b10_ToolTime_R, "( ", *s_OpComment, " >>> Rapid: ", ptimeout
	 ttltime = b10_ToolTime_F, " --- Feed: ", ptimeout, " )", e$
	 ToolLength_F = b10_Length_F
	 ToolLength_R = b10_Length_R
	 "( Rapid path: ", *ToolLength_R, " --- Feed path: ", *ToolLength_F, " )", e$
	 if (rc10 - 1) <> size10, "( -------------------- )", e$
 ]
 "( ************************************************** )", e$

pReadBuffer_10_3
"( ************** Tool Time/Path *************** )", e$
size10 = rbuf(10, 0)
rc3 = 1
 rc10 = 1
 b10_MaxTool = -1
 szerszam_out = 0
 temp_counter = 0
while rc10 <= size10,
 [
	 b10_index = rbuf(10, rc10)
	 if b10_ToolNo > b10_MaxTool, b10_MaxTool = b10_ToolNo
 ]
 rc10 = 1
 while temp_counter <= b10_MaxTool,
 [
	 while rc10 <= size10,
	 [
		 b10_index = rbuf(10, rc10)
		 s_ToolName = rbuf(3, rc3)
		 if temp_counter = b10_ToolNo,
		 [
			 ToolTime_F = ToolTime_F + b10_ToolTime_F
			 ToolTime_R = ToolTime_R + b10_ToolTime_R
			 ToolLength_F = ToolLength_F + b10_Length_F
			 ToolLength_R = ToolLength_R + b10_Length_R
			 szerszam_out = 1
			 sav_ToolName = s_ToolName
		 ]
	 ]
	 if szerszam_out = 1,
	 [
		 b10_ToolNo = temp_counter
		 ttltime = ToolTime_R, "( ", *b10_ToolNo, " - ", *sav_ToolName, " >>> Rapid: ", ptimeout
		 ttltime = ToolTime_F, " - Feed: ", ptimeout, " )", e$
		 "( Rapid path: ", *ToolLength_R, " --- Feed path: ", *ToolLength_F, " )", e$
		 if b10_ToolNo <> b10_MaxTool, "( -------------------- )", e$
	 ]
	 temp_counter = temp_counter + 1
	 rc10 = 1
	 rc3 = 1
	 szerszam_out = 0
	 ToolTime_F = 0
	 ToolTime_R = 0
	 ToolLength_F = 0
	 ToolLength_R = 0
 ]
 "( ********************************************* )", e$

 

 

Output list @ peof:

peof$		 #End of file for non-zero tool		
 pretract
 pWriteBuffer_10
 comment$
 if stagetool = 1 & stagetltype = 2, pbld, n$, *first_tool$, e$
 n$, "M30", e$
 #mergesub$
 #clearsub$
 #mergeaux$
 #clearaux$
 "%", e$
 #
 subout$ = 0
 ptooldata #Total ending data for tool (Path Length and Times)
 sav_spc = spaces$
 spaces$ = 0
 #
 pReadBuffer_10_2
 pReadBuffer_10_3
 "()", e$
 #
 "( *** Megtett Ut/Ido adatok *** )", e$
 "( Megtett Ut Gyorsjarattal = ", *rlen_total, "mm )", e$
 "( Megtett Ut Elotolassal = ", *llen_total, "mm )", e$
 ttltime = total			 #Transfer TOTAL program time
 "( Teljes Ciklusido = ", ptimeout, " )", e$ #Program Total time output
 ttltime = tot_rtime
 "( Teljes Ido Gyorsjaratban : ", ptimeout, " )", e$
 ttltime = tot_ltime
 "( Teljes Ido Elotolasban : ", ptimeout, " )", e$
 "()", e$
 "()", e$
 #
 spaces$ = sav_spc
 #
 mergeaux$
 clearaux$

 

 

So? I hope I'm not miss anything...

 

:beer:

  • Thanks 1
  • Like 1
Link to comment
Share on other sites
  • 1 month later...

Thank you Peter.

 

If I want to display cycle time in toolist. How to set it?

 

 

(T1-DEFINE TOOL NAMES-D1-H1-10.000mm >>> Rapid: 0:00 - Feed: 14h 30:13 )

(T2-DEFINE TOOL NAMES-D2-H2-D12.000mm >>> Rapid: 0:01 - Feed: 1:15 )

(T3-DEFINE TOOL NAMES-D3-H3-D10.000mm >>> Rapid: 0:00 - Feed: 2:03 )

Link to comment
Share on other sites

Thank you Peter.

If I want to display cycle time in toolist. How to set it?

 

Your welcome! ;)

See pReadBuffer_10_3 postblock!

Output:

( ************** Tool Time/Path *************** )
( T2 - 1/2" Ballnose  >>>  Rapid: 0:02  -  Feed: 24:08 )
( Rapid path: 438.594mm  ---  Feed path: 6034.226mm )
( -------------------- )
( T3 - D5mm Drill HSS  >>>  Rapid: 0:12  -  Feed: 1:34 )
( Rapid path: 2638.721mm  ---  Feed path: 141.2mm )
( -------------------- )
( T9 - D7mm Drill HSS  >>>  Rapid: 0:06  -  Feed: 0:05 )
( Rapid path: 1230.559mm  ---  Feed path: 16.mm )
( -------------------- )
( T10 - D12mm EndMill - Nagyolo  >>>  Rapid: 0:19  -  Feed: 37:49 )
( Rapid path: 1822.911mm  ---  Feed path: 8140.352mm )
( -------------------- )
( T26 - D18mm EndMill  >>>  Rapid: 0:02  -  Feed: 6:30 )
( Rapid path: 507.547mm  ---  Feed path: 1168.609mm )
( ********************************************* )

 

If you need more data of tools (like H/D) you can easily extend Buffer-10 with them.

  • Like 1
Link to comment
Share on other sites

HI,Petet.

Buffer file is difficult for me. According to your said, I have set it ,but when I modify length offset number/Diameter offset of tool. I found it is not changed,

also,I want to output tool diameter. Thanks. :unworthy:

 

 

(T1 - 10. FLAT ENDMILL - H1 - D1 - D10.000mm)

(T2 - DEFINE TOOL NAMES - H2 - D2 - D12.000mm)

(T3 - DEFINE TOOL NAMES - H5 - D3 - D10.000mm)

( ************** Tool time/Path *************** )

(T1- 10. FLAT ENDMILL-D1-H1- D10>>> Rapid: 0:00 - Feed: 14h 30:13 )

(T2--D2-H2-D10 >>> Rapid: 0:01 - Feed: 1:15 )

(T3--D3-H3- D10>>> Rapid: 0:00 - Feed: 2:03 )

( ********************************************* )

Link to comment
Share on other sites
  • 5 years later...
  • 1 month later...

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