cancel
Showing results for 
Search instead for 
Did you mean: 

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

Good day everyone,

 

Is there any way to output some text at the very start of the program with PostBuilder?

 

UDE is one of the most straight forward answers, however, UDE will only be executed after "Start of Program" has been finished. For example, as the following pic shows:kl.jpg

 

if a UDE, say "Operator Message" is programmed, the message will then be shown AFTER the line G40 G17 G90 G71, like these:

  

%
N0010 G40 G17 G90 G71
N0020 (This is a test program)
N0030 G91 G28 Z0.0
N0040 T01 M06
N0050 T02
N0060 G00 G90 X50. Y50. S0 M03
N0070 G43 Z53. H01
N0080 G82 Z50. R53. F250.
N0090 G80

 What I want is this: 

%
N0010 (This is a test program)
N0020 G40 G17 G90 G71
N0030 G91 G28 Z0.0
N0040 T01 M06
N0050 T02
N0060 G00 G90 X50. Y50. S0 M03
N0070 G43 Z53. H01
N0080 G82 Z50. R53. F250.
N0090 G80

 Thanks in advance

 

Regards,

Stephan

12 REPLIES

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

If you attach the ude to the NC_PROGRAM then it will come out first thing.  However it will come out every program group.

 

What I ended up doing however was split the output into 2 different files and combined them at the end of posting. Then I can run through the whole program and collect data to put at the end of the header file I created.

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

Phenom
Phenom

One option is to put the stuff that is coming out before the ude in the first tool event.

NX10.03
Windows 7 Pro

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

Phenom
Phenom

To clarify: First tool event in postbuilder.

 

Untitled.jpg

NX10.03
Windows 7 Pro

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

I guess the issue I was running into was I wanted to output code after my program header and I coudln't get it to go in the right spot.  I just have found it nice to output 2 seperate files (or more) so you have total control over what code goes where.

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

Phenom
Phenom

I like to open the file after posting (MOM_end_of_program) and replace stuff (with pointer lines written at post time.) A tool list at the top of the program is an example of this. The problem with this approach (I have realized lately) is that with sync manager and with ISV - the changes made this way are not considered. When I do it - I read the file into an array - look for my pointers - replace with whatever - and dump out the array with the new lines back into the file. I have also taken the approach of not writing anything to a file at post time (override MOM_before_output) and fill an array. There are a few approaches possible - but all have their problems.

NX10.03
Windows 7 Pro

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

PLM World Member Phenom PLM World Member Phenom
PLM World Member Phenom

You could assign the “text” to the program group as an attribute

Check out mom_attr_PROGRAMVIEW_<name> from the MOM Variables Browser in PB

This can be read at the start of program

I have seen this done to get a program ID out at the start

 

John Joyce, Manufacturing Engineer,
Senior Aerospace Connecticut
www.senioraeroct.com
Production: NX10.0.3.5, Vericut 8.0.3
Development: Tcl/Tk
Testing: NX11.0.2.7

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

Esteemed Contributor
Esteemed Contributor

Or you could assign the attributes to the part itself (File -> Properties -> Attributes tab)

post variable = mom_attr_PART_*

 

If you want something in START OF PROGRAM you are pretty much stuck with attributes - UDEs get triggered too late to be of help in THAT event.  See docs:

CAM (or "Manufacturing" ) -> NX Post -> Post Concepts -> Order of events

 

UDEs attached to NC_PROGRAM _may_ get triggered early enough for you to output data AFTER "start of program" and before anything else gets output by the post (or maybe not).  But their data will NOT be available in "Start of program"

 

Ken

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


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

Hi Jake

Thanks for the reply. Please forgive my ignorance, but I am not quite sure how to manage to do what you are saying here. Mind if you share more details on how to "split the the output into 2 different files and combined them at the end of posting"?

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

Thanks Ken.

 

Good advice on "attribute". This should accomplish the current goal. But come to think about it, if the texts require information that will be grabbed from the program intelligently, this method could be somewhat unsuitable.

 

For example, I want to output a toollist using the predefined PB_CMD_create_toollist in front of the line G40 G90 G17 G71 in my Start Of Program and  I want the toollist output to be controllable, meaning an NC programmer can choose either to output a toollist or not inside NX. 

Learn online





Solution Information