cancel
Showing results for 
Search instead for 
Did you mean: 

Shop Docs Total Time

We are using the Opreation List to create some shop docs and the Time for each Tool Path comes in great. But we would like to put in the total time of the whole program. Does any one know what the variable is to do this? It would be the time at the top of the program in the operation Navigator. So it is being calculated in NX already.

 

Thanks for all the help

Steve

13 REPLIES

Re: Shop Docs Total Time

Genius
Genius

there is no variable... to put the total time of the whole program, but you can get the toolpath time by operation (mom_toolpath_time) but maybe you know this.

many topics on this forum for this question... do a small search and you will certainly find what you are looking for...

@mkn

Re: Shop Docs Total Time

Thanks for the reply.

I have the Toolpath time in there and that works great but I have been asked to put in the total time at the end.

 

I found this one but it doesn't seem to work.

mom_machine_time (The total machine time.  Includes cutting, non-cutting and other additional times such as tool change time.)

Re: Shop Docs Total Time

Genius
Genius

i don't know mom_machine_time (maybe this variable works if you use a cnc postprocessor)

At the end it's more easy... , add mom_toolpath_time in a list at the end of program do a sum of this list.  

@mkn

Re: Shop Docs Total Time

How do you do a sum of the list?

Re: Shop Docs Total Time

Genius
Genius
proc sum {list} {
set sum 0
foreach val $list {
  set sum [expr {$sum + $val}]
}
return $sum
}

I hope this helps...

@mkn

Re: Shop Docs Total Time

Where do you end up putting the information?

In what File? the .xlxs, .htm,

Re: Shop Docs Total Time

Genius
Genius

tcl file...

@mkn

Re: Shop Docs Total Time

Any where in particular in the shopdoc_excel.tcl file or fright at the end.

DO I have to put anything in the excel file to produce that then?

Re: Shop Docs Total Time

Genius
Genius

you don't know tcl and i don't know shopdoc based on excel Smiley Very HappySmiley Very Happy

you can put this procedure anything in tcl file (shopdoc_excel.tcl ) put at the end for you...

I have never tested (Do not take offence if don't works...) i will do like that :

proc MOM_End_Part_Documentation { } {
global list_of_toolpath_time

# your proc sum 
set total_time [sum $list_of_toolpath_time]

 # put $total_time in a cell 
...
}

proc sum {list} {
set sum 0
foreach val $list {
  set sum [expr {$sum + $val}]
}
return $sum
}

 

@mkn

Learn online





Solution Information