Cancel
Showing results for 
Search instead for 
Did you mean: 

Mom_post_processor

Creator
Creator

I'm having trouble getting the Mom_post_processor command to work.  Its just not jumping to the secondary post... Sure Im doing something wrong but not figuring it out... I must be misunderstanding the format or something ... can anyone see my mistake?

 

   global ptp_file_name
   global mom_output_file_directory
   global mom_operation_name
   global mom_output_file_basename
   global mom_sys_output_file_suffix


   MOM_close_output_file $ptp_file_name
   MOM_remove_file $ptp_file_name #delete ptp file
   set ptp_file_name "${mom_output_file_directory}${mom_output_file_basename}.nc"
   MOM_remove_file $ptp_file_name
   MOM_open_output_file $ptp_file_name

 #  MOM_run_postprocess "[file dirname $::mom_event_handler_file_name]/MORI_HORI_Sub.tcl"\
 #                      "[file dirname $::mom_event_handler_file_name]/MORI_HORI_Sub.def"\
 #                      "${::mom_output_file_directory}sub_program.out"


   MOM_run_postprocess "${UGII_CAM_LIBRARY_MACHINE_DIR}/Generic_Fanuc_NX11.tcl"\
                       "${UGII_CAM_LIBRARY_MACHINE_DIR}/Generic_Fanuc_NX11.def"\
                       "z:\sub_program.out"



#   MOM_run_postprocess "L:\UG\nx11\postprocessor\Generic_Fanuc\Generic_Fanuc_NX11.tcl"\
#                       "L:\UG\nx11\postprocessor\Generic_Fanuc\Generic_Fanc_NX11.def"\
#                      "Z:\testing_multipost.out"
 #                      ${::mom_output_file_directory}sub_program.out



   MOM_close_output_file $ptp_file_name
   MOM_remove_file $ptp_file_name #delete ptp file
   set ptp_file_name "${mom_output_file_directory}${mom_output_file_basename}.i"
   MOM_remove_file $ptp_file_name
   MOM_open_output_file $ptp_file_name
5 REPLIES 5

Re: Mom_post_processor

Legend
Legend

Hi,

i think you have a problem with this path : z:\sub_program.out in Tcl the backslash is a escape character , if you use this path as argument or variable Tcl read this :

set out "z:\sub_program.out"
MOM_output_literal "MyoutFile = $out"
> Myoutfile = z:sub_program.out

As you see in the result the backslash disappeared. To avoid you can make it 4 ways :

set out "z:\\sub_program.out" ; # double backslash
set out {z:\sub_program.out} ; # Tcl substitution
set out [regsub -all {\\} {z:\sub_program.out} {/}] ; # regsub command
set out [file join {z:\sub_program.out}] ; # file join command

reference : regsubfile join

Production: NX11.0.2.7,VERICUT 8.1.2
Development: Tcl/Tk, Gnuplot
www.adgroupe.com

Re: Mom_post_processor

Creator
Creator

Still not having any luck outputting any code from the other post... 

 

set out {z:\sub_program.out}
#set out "z:\\sub_program.out"
MOM_output_literal "MyoutFile = $out"



  MOM_run_postprocess "L:\UG\nx11\postprocessor\Generic_Fanuc\Generic_Fanuc_NX11.tcl"\
                      "L:\UG\nx11\postprocessor\Generic_Fanuc\Generic_Fanc_NX11.def"\
                      {z:\sub_program.out}
 #                      $out
 #                     "z:\\sub_program.out"
 #                     "${::mom_output_file_directory}sub_program.out"

 

 

Re: Mom_post_processor

Legend
Legend

Hi ,

Same mistake but with ...\Generic_Fanuc\...

try this :

MOM_run_postprocess {L:\UG\nx11\postprocessor\Generic_Fanuc\Generic_Fanuc_NX11.tcl} \
                    {L:\UG\nx11\postprocessor\Generic_Fanuc\Generic_Fanc_NX11.def} \
                    {z:\sub_program.out}
Production: NX11.0.2.7,VERICUT 8.1.2
Development: Tcl/Tk, Gnuplot
www.adgroupe.com

Re: Mom_post_processor

Creator
Creator

i tried that also with no result.. Maybe Im misunderstanding this funtion?  I have put this command in the start of program group... I was under the impression I can use this command to have the same program posted with several post at the same time.  Is that correct?

 

global ptp_file_name
global mom_output_file_directory
global mom_operation_name
global mom_output_file_basename
global mom_sys_output_file_suffix


# MOM_close_output_file $ptp_file_name
# MOM_remove_file $ptp_file_name #delete ptp file
# set ptp_file_name "${mom_output_file_directory}${mom_output_file_basename}.nc"
# MOM_remove_file $ptp_file_name
# MOM_open_output_file $ptp_file_name

# MOM_run_postprocess "[file dirname $::mom_event_handler_file_name]/MORI_HORI_Sub.tcl"\
# "[file dirname $::mom_event_handler_file_name]/MORI_HORI_Sub.def"\
# "${::mom_output_file_directory}sub_program.out"


# MOM_run_postprocess "${UGII_CAM_LIBRARY_MACHINE_DIR}\Generic_Fanuc_NX11.tcl"\
# "${UGII_CAM_LIBRARY_MACHINE_DIR}\Generic_Fanuc_NX11.def"\
# {z:\sub_program.out}

#set out {z:\sub_program.nc}
#set out "z:\\sub_program.out"


# MOM_close_output_file $ptp_file_name
# MOM_remove_file $ptp_file_name #delete ptp file
# set ptp_file_name "$out"
# MOM_remove_file $ptp_file_name
# MOM_open_output_file $ptp_file_name
# MOM_output_literal "MyoutFile = $ptp_file_name"


# MOM_run_postprocess "L:\UG\nx11\postprocessor\Generic_Fanuc\Generic_Fanuc_NX11.tcl"\
# "L:\UG\nx11\postprocessor\Generic_Fanuc\Generic_Fanc_NX11.def"\
# $ptp_file_name
# {z:\sub_program.out}
# $out
# "z:\\sub_program.out"
# "${::mom_output_file_directory}sub_program.out"


# MOM_close_output_file $ptp_file_name
# MOM_remove_file $ptp_file_name #delete ptp file
# set ptp_file_name "${mom_output_file_directory}${mom_output_file_basename}.i"
# MOM_remove_file $ptp_file_name
# MOM_open_output_file $ptp_file_name

MOM_run_postprocess {L:\UG\nx11\postprocessor\Generic_Fanuc\Generic_Fanuc_NX11.tcl} \
{L:\UG\nx11\postprocessor\Generic_Fanuc\Generic_Fanc_NX11.def} \
{z:\sub_program.out}

Re: Mom_post_processor

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I would use MOM_run_postprocess to get data for an for the start of a program run (e.g. tool list, fixture offset list, etc.) when (normally) it isn't available until the end of program.

 

While you SHOULD be able to do what you ask, I'd say you are just complicating issues.

And...By the way, all of your output files are the same name.  So the 2nd post over-writes the file from the first post, etc.  You would have to change the output file name for each post!

 

If I wanted to post thru several posts, I'd do that using a journal.

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


Learn online





Solution Information