Cancel
Showing results for 
Search instead for 
Did you mean: 

operator message location

Valued Contributor
Valued Contributor

Hello.

At the Post(PB) level, How to control where the operator message gets output?

I am aware of the using Start Marker ude...

Kal.

 

bad output.
...
... (*** OPERATOR MESSAGE TEST 1 ***) (**********) (*** OPERATOR MESSAGE TEST 2 ***) ( ==============================) ( OPERATION: OP_HEADER_1 ) ( TOOL: T1_.750_DRILL ) ( ============================== ) S100 M3 M8 G0 G90 G54.1 P1 X0.0 Y18. A0.0 C0.0 G54.2 P1 G43 Z7. H1 ...
... good output.
...
... ( ==============================) ( OPERATION: OP_HEADER_1 ) ( TOOL: T1_.750_DRILL ) ( ============================== ) (*** OPERATOR MESSAGE TEST 1 ***) (**********) (*** OPERATOR MESSAGE TEST 2 ***) S100 M3 M8 G0 G90 G54.1 P1 X0.0 Y18. A0.0 C0.0 G54.2 P1 G43 Z7. H1
...
...
NX 9.0.3.4 MP12
PB 9.0.3.2
Vericut7.3.4

Testing NX 11.0.2.7 MP3
11 REPLIES

Re: operator message location

Esteemed Contributor
Esteemed Contributor

One way (I use this method to delay coolant, among other things, but it can be used for anything)

Write a "PB_CMD_kal_delay_op_message"

global kal_delay_operator_message
set kal_delay_operator_message 1

Add to "start of program" and "end of path" events

 

 

Modify MOM_operator_message (note this may change slightly depending on PB version & template/control used to create the post - I just created a PB10.0.1 post and it is "proc OPERATOR_MSG" ?!?!?!?!)  or something else.

If the flag (above) exists, you want to save the message in a list (shown) or an array (probably better) and NOT output it:

global mom_operator_message
global kal_delay_operator_message
global kal_delayed_messages
global mom_sys_control_in
global mom_sys_control_out

# you might want to check to make sure mom_operator_message exists and is not zero length

if {[info exists kal_delay_operator_message]} {
    lappend kal_delayed_messages $mom_operator_message
    return
}

MOM_output_literal "${mom_sys_control_out}$mom_operator_message$mom_sys_control_in"
unset mom_operator_message

Then the final part....

 

Wherever you want the "saved" messages output, add a "PB_CMD_kal_output_delayed_op_messages" to clear the flag and output any "delayed" messages:

global mom_operator_message
global kal_delay_operator_message
global kal_delayed_messages

# clear flag, so later messages are output where specified
catch { unset kal_delay_operator_message} 

# if nothing delayed/saved, return
if {![llength $kal_delayed_messages]} { return }

# Have saved (delayed) messages - so output them & clean up
# or as appropriate for an array
foreach msg $kal_delayed_messages {
    set mom_operator_message $msg
    MOM_operator_message
}
unset kal_delayed_messages ;# make SURE to clean up

Hope this helps...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: operator message location

Valued Contributor
Valued Contributor

Brilliant Ken. It works...Thank you!

 

Prior to this thread, I contacted GTAC (IR7713317) on this issue...today, I related your solution back to GTAC & it's been added to the Solution Center. 

 

 

 

Kal. 

 

NX 9.0.3.4 MP12
PB 9.0.3.2
Vericut7.3.4

Testing NX 11.0.2.7 MP3

Re: operator message location

Esteemed Contributor
Esteemed Contributor

Kal -

Note (like I said) this technique can be used for a LOT of other cases where you want to always delay output of UDE data until a specific point in the posted code (I use it all the time for coolant)

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: operator message location

Valued Contributor
Valued Contributor

Perfect.. Thanks Ken.

Kal.

NX 9.0.3.4 MP12
PB 9.0.3.2
Vericut7.3.4

Testing NX 11.0.2.7 MP3

Re: operator message location

Valued Contributor
Valued Contributor

Ken.

Perhaps something I've done...but when I pp operations without "Operator Message"...I am running into this error...

***** A TCL Error Has Occurred *****
Event Handler: C:\******\*****\******\********\new_post.tcl
Event: MOM_initial_move
Error Info: can't read "kal_delayed_messages": no such variable
    while executing
"llength $kal_delayed_messages"
    (procedure "PB_CMD_kal_output_delayed_op_messages" line 11)
    invoked from within
"PB_CMD_kal_output_delayed_op_messages"
    (procedure "MOM_initial_move" line 7)
    invoked from within
"MOM_initial_move"
Error Code: NONE

 

 

Kal.

 

NX 9.0.3.4 MP12
PB 9.0.3.2
Vericut7.3.4

Testing NX 11.0.2.7 MP3

Re: operator message location

Legend
Legend

you can add this condition:

if {![info exists kal_delayed_messages]} { return }

@mkn
Production: NX11.0.2.7,VERICUT 7.3.3
Development: Tcl/Tk, Gnuplot
www.deshors-tiremold.com

Re: operator message location

Valued Contributor
Valued Contributor

Any specific location? multiple places?

 

Kal.

NX 9.0.3.4 MP12
PB 9.0.3.2
Vericut7.3.4

Testing NX 11.0.2.7 MP3

Re: operator message location

Legend
Legend

i think simply to your proc "PB_CMD_kal_output_delayed_op_messages"

@mkn
Production: NX11.0.2.7,VERICUT 7.3.3
Development: Tcl/Tk, Gnuplot
www.deshors-tiremold.com

Re: operator message location

Valued Contributor
Valued Contributor

I still get the same error....

 

***** A TCL Error Has Occurred *****
Event Handler: C:\*****\****\*****\*******\new_post.tcl
Event: MOM_initial_move
Error Info: can't read "kal_delayed_messages": no such variable
    while executing
"llength $kal_delayed_messages"
    (procedure "PB_CMD_kal_output_delayed_op_messages" line 11)
    invoked from within
"PB_CMD_kal_output_delayed_op_messages"
    (procedure "MOM_initial_move" line 7)
    invoked from within
"MOM_initial_move"
Error Code: NONE
NX 9.0.3.4 MP12
PB 9.0.3.2
Vericut7.3.4

Testing NX 11.0.2.7 MP3

Learn online





Solution Information