Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Postbuilder issues

Phenom
Phenom

Not sure what tool list proc you are running - but the OTB "pb_cmd_tool_list.tcl" calls pb_post_tool_list.tpl that issues cycle objects function (like shopdocs) to get the tool list info. In NX8.5 - I started to notice that calls to cycle_objects through the tool navigator can produce errors on some tool objects (at least when cycle_objects is issued while posting - maybe with shop doc generate it is "caught") - so I put catch {} around the calls. I use cycle_objects to get a lot of info before posting - so I had every post blowing up with 8.5. This may be playing in to your problem - the post may be bailing out of the list.

NX12.02
Windows 10 Pro
ITC Inc.

Re: Postbuilder issues

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

What I would try to debug this:

1) In the proc(s) where you store the info, add some "MOM_output_text" or "MOM_output_to_listing_device" calls to list out the info you are storing

2) search for "moog_show_globals" here on the community (or legacy forums)

Add a call to moog_show_globals just before you output the tool list

 

(1) will make sure you are saving the data you think you are saving

(2) will see if that data exists before you output the list.  So you can tell if the data is not there, or if the output logic (of looping thru the data) is not doing what it should.

 

Hope this helps...Ken

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: Postbuilder issues

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

Added some debugging MOM_output_to_listing_device

Found that while generating the toollist, the parameter tool_type is not filled for those tools that don't show up on the tool list.

The tools are retrieved from a tool library that follow the standard tool-types.

 

Guess I'll have to try to figure out how to build my own toollist.

For the tool change I've got a custom command, where I should be able to catch the info I need.

 

What I need is a table like this:

; Tool     | Cutting time | Total time
; ====================================
; T1000127 |         3.27 |       4.05
; T1001325 |         1.06 |       1.26
; T1002035 |        67.78 |      71.33
; ====================================
; Totals            72.11 |      76.64

 

; Tool          |

;T1000127 |

Patrick Delisse
KMWE - Aero Engine
NX 12.0, TC 11.2, CAMPOST V22, Vericut 8.2, TDM 4.8
C#, VB, .NET
Highlighted

Re: Postbuilder issues

Phenom
Phenom

I put out tool lists - but with a lot of extra stuff (uses both cycle objects and other events.)

 

This would be an off the top of my head start (of coding) in a custom command (would have to be debugged) in end of path:

 

  global mom_next_tool_status mom_next_oper_has_tool_change
  switch -exact "$mom_next_tool_status\_$mom_next_oper_has_tool_change" {

    "NEXT_YES" {
      global currtime mom_machine_time mom_last_time tlist
      if {![info exists mom_last_time]} {set mom_last_time 0}
      set currtime [expr $mom_machine_time-$mom_last_time]
      lappend tlist "$mom_tool_number | $currtime"
      set mom_last_time $mom_machine_time
    }
  }

 And this in a custom command in end of program:

 

  global tlist
  
  foreach _i $tlist { MOM_output_literal "$_i" }

 

NX12.02
Windows 10 Pro
ITC Inc.

Re: Postbuilder issues

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

Works perfect. A lot more user friendly than the ootb tool-list code

After debugging this is the END-OF-PATH code:

Custom Command: PB_CMD_tool_list_collect_data

global mom_next_tool_status mom_next_oper_has_tool_change
global tlist
  
switch -exact "$mom_next_tool_status\_$mom_next_oper_has_tool_change" {

  "NEXT_YES" {
    global currtime mom_last_time tlist mom_machine_time mom_tool_number
    if {![info exists mom_last_time]} {set mom_last_time 0}
    set currtime [expr $mom_machine_time - $mom_last_time]
    lappend tlist "$mom_tool_number | $currtime"
    set mom_last_time $mom_machine_time
  }
}

 Because the last tool won't get a NEXT_YES condition the last tool needs to be forced into the NEXT_YES block in the program en seq:

Custom Command: PB_CMD_tool_list_output

#The last tool data needs to be forced to the tool list
global mom_next_tool_status mom_next_oper_has_tool_change

set mom_next_tool_status "NEXT"
set mom_next_oper_has_tool_change "YES"

PB_CMD_tool_list_collect_data

global tlist
  foreach _i $tlist { MOM_output_literal "$_i" }

 Thanks a lot.

Patrick Delisse
KMWE - Aero Engine
NX 12.0, TC 11.2, CAMPOST V22, Vericut 8.2, TDM 4.8
C#, VB, .NET

Re: Postbuilder issues

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I believe the mom_next_tool_status is "FIRST" for the last tool change.

Also note there is a variable "mom_current_oper_is_last_oper_in_program" (set to "YES" if true) if that is useful

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: Postbuilder issues

Genius
Genius

Don't you guys wish NX could output a "useful and real" tool list without end user's need to learn TCL, HTML, Postbuilder, CLS, and few other languages?

Jerry

 

Re: Postbuilder issues

PLM World Member Legend PLM World Member Legend
PLM World Member Legend
Wouldn't that be nice.
Same goes for the nice "Looking" new probing operations. Need to be a TCL wizard to get that figured out.
Patrick Delisse
KMWE - Aero Engine
NX 12.0, TC 11.2, CAMPOST V22, Vericut 8.2, TDM 4.8
C#, VB, .NET

Learn online





Solution Information