cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to combine output files for an okuma twin turret lathe?

Valued Contributor
Valued Contributor

The sync manager outputs to two separate files. While using the application the sync manager errors  during post processing when you close the output file.  Just wondering if anyone had success doing this and can share how they went about doing this.

Using NX 8.0.3.4
4 REPLIES

Re: Is there a way to combine output files for an okuma twin turret lathe?

Phenom
Phenom

I have not done this (work with sync manager for this problem) - but if you source a tcl and in it have a proc called MOM__halt (2 underscores) it will allow you to do things as a final step of postprocessing. Multi channel will actually run multiple passes through the post - and (I think) go through MOM_end_of_program more than once. The variable mom_run_number (I think) indicates the channel. MOM__halt will run only once after all channels. Here you can do whatever to need to the files.

NX10.03
Windows 7 Pro

Re: Is there a way to combine output files for an okuma twin turret lathe?

Valued Contributor
Valued Contributor

Thanks for reminding me that it runs twice. Knowing that and the variable "mom_run_number" It should be easy combining the files for the okuma.

 

I don't think I will need to use the MOM__halt proc, but I would like to know more about it. where can I find it to source it in?

Using NX 8.0.3.4

Re: Is there a way to combine output files for an okuma twin turret lathe?

Phenom
Phenom

I don't think it is in any custom command shipped. You (I think) have to source a tcl file from "Output Settings" "Other Options" "Source User's Tcl File" in PB. Then put this in it:

 

proc MOM__halt {} {

  #code

}

 

It seems like I had trouble getting NX to call it if exposed (upleveled) in postbuilder routines. Maybe when the post starts - it looks for it existing and if not - never tries to call it. I may have drawn the wrong conclusion at the time (is another possibility.)

NX10.03
Windows 7 Pro

Re: Is there a way to combine output files for an okuma twin turret lathe?

Experimenter
Experimenter
   set new [open $file w]
   set upper [open ${mom_output_file_directory}upper_temp r]
   set lower [open ${mom_output_file_directory}lower_temp r]

   fcopy $upper $new
   fcopy $lower $new

   close $new
   close $upper
   close $lower
   
   if {[file exists $upper] && [file exist $lower]} {
      file delete $lower
      file delete $upper
   }

   #file rename -force $new $rest
   MOM_open_output_file $file

Learn online





Solution Information