Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: How to output operator's messages at the start of the program

Genius
Genius

Hi,

 

We output comment lines at the start of the program using a UDE which the programmer can put information in via NX and we also put a tool datuming list at the top of the program so that the machine knows what method to use when datuming the required tooling see below output.

O12345
(POST TIME: 07:14 19/06/14 WITH NX 7.5.5.4)
(POST VERSION: AM10 MAZAK FJV250 REVAMPED v4.8)
(POST COMPATIBLE WORKCENTRES: AM10 AM11)
(MENC NAME: MC-0000-1234-01-Probing_Test_part-AM10-OP5-A)
(PART DESC: MC-SETUP6082-AM10-OP5)
(OPERATION NO: 1)
(WING CYCLE TIME: 27.8 MINS)
(WING CYCLE TIME NO DATUMING: 21.4 MINS)
()
(My Comments here)
(Add detail to this)
(Area for operator )
(information!)
()
()
#667=9106
()
(TOOL LENGTH OFFSETS)
#2001=81.000  (HH-FM01-0050-01 - B314)
#2002=123.000 (HH-SL01-1000-01 - A179)
#2003=125.000 (HC-SL01-0400-01 - A168)
#2006=80.000  (HH-FM01-0080-01 - B316)
#2007=90.000  (HH-FM01-0063-01 - B315)
#2008=80.000  (HH-FM01-0120-01 - F263)
#2009=155.000 (HH-SL01-1600-01 - A181)
#2010=125.000 (HC-SP01-0300-01 - D446)
()
(TOOL DATUM BIT MAPS)
#601=121.5000
#602=121.1000
#603=121.0400
#606=121.8000
#607=121.6300
#608=122.2000
#609=121.1600
#610=211.0300

 This format is the same for all our posts and we created a standard header. 

Regards

Dave
NX10.0.3MP13
NX11.0.1
Production
TC10
Vericut 7.3,7.4.1,8.0.2
Highlighted

Re: How to output operator's messages at the start of the program

Here is the way I do it.

 

First thing the post does is creates a "header" file and a "code" file

 

MOM_set_seq_off

global header_output_name final mom_output_file_full_name mom_output_file_basename
global mom_output_file_directory 


set final "$mom_output_file_directory"
append final $mom_output_file_basename "NC.ptp"

set header_output_name "$mom_output_file_directory"
append header_output_name $mom_output_file_basename "HDR.ptp"

MOM_open_output_file $header_output_name
MOM_open_output_file $final
MOM_close_output_file $mom_output_file_full_name
MOM_close_output_file $final

 

Then you can just use the MOM_open & MOM_close to control which file your outputting to.  I post out my header info, close that and start posting code.  The cool thing is you can collect data on your way through the program and output it to the header file.  What this allows you to do is output information in the beginning of the program that wouldn't be available until you've posted the whole program.

 

Then at the end of the program I combine the 2 scratch files back into my original output file.

 

#Combines the header and the main body of program together

global mom_output_file_full_name mom_output_file_basename mom_output_file_directory mom_output_file_suffix
global fl fin line final header_output_name



MOM_open_output_file $mom_output_file_full_name
MOM_close_output_file $final


set fin 0

set fin [open "$header_output_name" r]
    while {[gets $fin line] >= 0} {
            MOM_output_literal "$line"
          }
close $fin

set fin [open "$final" r]
    while {[gets $fin line] >= 0} {
            MOM_output_literal "$line"
          }
close $fin

file delete -force "$final" "$header_output_name"

 

Hope this make sense!

Jake Hardwick
CNC Programmer
Senior Aerospace AMT
Production NX8.5.3.3 Beta testing NX10.0.1.4

Re: How to output operator's messages at the start of the program

Beautiful and makes perfect sense. Thanks Jake.

Learn online





Solution Information