Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

linked post

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hi,

 

I have a problem linking two postprocessor. 

I have two postprocessor: post_1 and post_2.

 

I start reading post_1 and If I have a "Mill User-Defined" operation I want to read post_2. 

 

In MOM_start_of_path of post_1 I read this code, to jump to post_2:

 

 

global mom_operation_type mom_load_event_handler tcl_file def_file

set VAR [MOM_ask_env_var NX_CLIENTE_CAM_POST_DIR]
if { ($mom_operation_type == "Mill User-Defined") } {
    set tcl_file "${VAR}Sonda_TNC.tcl"
    set def_file "${VAR}Sonda_TNC.def"

} else {
    set tcl_file "${VAR}FX10000_TNC530.tcl"
    set def_file "${VAR}FX10000_TNC530.def"
}
set mom_load_event_handler "{$tcl_file}"
MOM_load_definition_file   "${def_file}"

 

And in the MOM_end_of_path of post_2 I return to post_1 with this code:

global mom_load_event_handler
set mom_load_event_handler   [MOM_ask_env_var NX_CLIENTE_CAM_POST_DIR]FX10000_TNC530.tcl
MOM_load_definition_file     [MOM_ask_env_var NX_CLIENTE_CAM_POST_DIR]FX10000_TNC530.def

If my first operation is a "Mill User-Defined" all run ok. 

 

But if it's not the first operation never jump to post_2.

 

Any idea?

 

Best Regards

Ivan

3 REPLIES

Re: linked post

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi

If you really need 2 postprocessors which will be called depending on operation type, I would do this using MOM_post_oper_path

I would use one master postprocessor which would only execute postprocessing of each operation by the post you like.

I never tried it, but should be possible also this way.

Marek Pawlus, NCmatic

Development: C#, Tcl/Tk, CSE

Re: linked post

Siemens Legend Siemens Legend
Siemens Legend

If you are using Post Builder, we use Linked Post option, and a HEAD UDE on a method to pick which post is used.

 

ScreenHunter_01 May. 09 10.35.gifScreenHunter_02 May. 09 10.47.gif

Re: linked post

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

If you look in the proc "MOM_head" (which is what is used to switch posts)

 

if { [info exists mom_sys_in_operation] && $mom_sys_in_operation == 1 } {
      global mom_operation_name
      CATCH_WARNING "HEAD event should not be assigned to an operation ($mom_operation_name)."
return
}

They really don't like you to switch posts within a tool path

 

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


Highlighted

linked post

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hi,

 

I have a problem linking two postprocessor. 

I have two postprocessor: post_1 and post_2.

 

I start reading post_1 and If I have a "Mill User-Defined" operation I want to read post_2. 

 

In MOM_start_of_path of post_1 I read this code, to jump to post_2:

 

 

global mom_operation_type mom_load_event_handler tcl_file def_file

set VAR [MOM_ask_env_var NX_CLIENTE_CAM_POST_DIR]
if { ($mom_operation_type == "Mill User-Defined") } {
    set tcl_file "${VAR}Sonda_TNC.tcl"
    set def_file "${VAR}Sonda_TNC.def"

} else {
    set tcl_file "${VAR}FX10000_TNC530.tcl"
    set def_file "${VAR}FX10000_TNC530.def"
}
set mom_load_event_handler "{$tcl_file}"
MOM_load_definition_file   "${def_file}"

 

And in the MOM_end_of_path of post_2 I return to post_1 with this code:

global mom_load_event_handler
set mom_load_event_handler   [MOM_ask_env_var NX_CLIENTE_CAM_POST_DIR]FX10000_TNC530.tcl
MOM_load_definition_file     [MOM_ask_env_var NX_CLIENTE_CAM_POST_DIR]FX10000_TNC530.def

If my first operation is a "Mill User-Defined" all run ok. 

 

But if it's not the first operation never jump to post_2.

 

Any idea?

 

Best Regards

Ivan

NX CAM Postprocessor Group
NX CAM Postprocessor Group

Members (123)