Cancel
Showing results for 
Search instead for 
Did you mean: 

Postprocessor - Start of Sync Manager - mom_post_update_sync_manager - NX10.03.

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

Hi together,

 

while starting the Sync Manager we have 2 post runs.

First with no informations of mom_post_update_sync_manager and sync marks and the second one with all informations.

 

Is it possible to start a third pp run with all informations like in the second one to fill the correct NC code for the simulation?

 

I have a problem to get env() variables from the 3rd channel for the first 1/2 channels.

 

Regards, Viktor

 

9 REPLIES

Re: Postprocessor - Start of Sync Manager - mom_post_update_sync_manager - NX10.03.

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I'm not quite sure what you are asking for, but...

There are mom variables you can use to determine if you are

  1. running the post outside sync manager
  2. running the post when sync manager starts, to get the info for sync manager
  3. posting from the sync manager dialog
  4. posting (outside sync manager) for IS&V
global mom_post_in_simulation		;# 0 (pure postprocessing), MTD, CSE, SYN (Sync Manager)
global mom_postprocessing_mode 		;# 1= from inside sync mgr, 0/unset = not
global mom_run_number ;# should equal channel???
global mom_number_of_runs ;# total number of channels being run

 

You can write a proc to glom the individual channel's output files into 1 file (run at end of case 3 above).  Test for:

- posting from sync manager

- channel = last channel

Then add to "end of program" event.

 

I'm not sure about simulating inside sync manager (I've not tested that case) but I would guess the variables exist to test for that as well...

 

Hope this helps, otherwise if you could clarify your issue?

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


Re: Postprocessor - Start of Sync Manager - mom_post_update_sync_manager - NX10.03.

Phenom
Phenom

I had done some testing (about this subject) and stopped for a while (don't remember details about it) but I found this:

 

******************************** Open partRead in post

MOM__halt
mom_post_in_simulation = 0

******************************** Right_click post on synced group

Read in post

MOM__halt
mom_post_in_simulation = 0

Read in post

start_of_program
mom_post_in_simulation = SYN
mom_run_number = 1

end_of_program

MOM__halt
mom_post_in_simulation = SYN
mom_run_number = 1

Read in post

MOM__halt
mom_post_in_simulation = 0

Read in post

start_of_program
mom_post_in_simulation = SYN
mom_run_number = 2

end_of_program

MOM__halt
mom_post_in_simulation = SYN
mom_run_number = 2

Read in post

start_of_program
mom_post_update_sync_manager = 1
mom_post_in_simulation = SYN
mom_run_number = 1

end_of_program

start_of_program
mom_post_update_sync_manager = 1
mom_post_in_simulation = SYN
mom_run_number = 2

end_of_program

******************************** Post button sync manager

Read in post

MOM__halt
mom_post_in_simulation = 0

Read in post

start_of_program
mom_postprocessing_mode = 1
mom_post_in_simulation = SYN
mom_run_number = 1

end_of_program

MOM__halt
mom_postprocessing_mode = 1
mom_post_in_simulation = SYN
mom_run_number = 1

Read in post

MOM__halt
mom_post_in_simulation = 0

Read in post

start_of_program
mom_postprocessing_mode = 1
mom_post_in_simulation = SYN
mom_run_number = 2

end_of_program

MOM__halt
mom_postprocessing_mode = 1
mom_post_in_simulation = SYN
mom_run_number = 2

So as Ken mentions (and above shows) there is plenty to consider.

NX10.03
Windows 7 Pro

Re: Postprocessor - Start of Sync Manager - mom_post_update_sync_manager - NX10.03.

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

Thank you for your detailed feedback.

 

First I need MOM_sync information in the first run.

 

   - First run = start sync manager with "machine simulate" or "synchronize"

                     = no informations of mom_post_update_sync_manager

 

The first run is without any MOM_sync events or marks.

So is it possible to start a 3rd postprocess? Is there a method for it?

 

Re: Postprocessor - Start of Sync Manager - mom_post_update_sync_manager - NX10.03.

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

Now we have the situation while starting Sync Manager:

 

1. post run:

  1. post ch1 - no sync information
  2. post ch2 - no sync information
  3. post ch3 - no sync information
  4. post ch4 - no sync information

 

2. post run:

  1. post ch1 - with sync information
  2. post ch2 - with sync information
  3. post ch3 - with sync information
  4. post ch4 - with sync information

 

I need a 3rd post run with all seperate channel posts. I dont know, but is there a method to realize it?

 

Regards, Viktor

Re: Postprocessor - Start of Sync Manager - mom_post_update_sync_manager - NX10.03.

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Are you saying you need a separate post for each channel?

Note you can modify post based on mom_run_number - the run number should match the channel.

 

Or do you want to take the output from the post (from within sync manager) and modify the G&M code somehow?

 

I'm still unclear what a 3 posting will add, that the 2nd doesn't already have.

 

What are you trying to achieve?

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


Re: Postprocessor - Start of Sync Manager - mom_post_update_sync_manager - NX10.03.

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

Hi Ken_A,

 

yes, I need a separate post for each channel.

 

But why? Because of env() vars depending on waitmarks.

 

So back to the situation while starting Sync Manager, another note:

- if click on machine reset buttot --> perfect result

- if click on post button --> perfect result

 

1. post run:

  1. post ch1 - no sync information
  2. post ch2 - no sync information
  3. post ch3 - no sync information
  4. post ch4 - no sync information

 

2. post run:

  1. post ch1 - with sync information --> [info exists env(yyy,$mom_sync_number)] == 0
  2. post ch2 - with sync information --> [info exists env(yyy,$mom_sync_number)] == 0
  3. post ch3 - with sync information --> set env(yyy,$mom_sync_number) xxx
  4. post ch4 - with sync information --> [info exists env(yyy,$mom_sync_number)] == 1

I hope you have an idea or another solution for this problem.

 

Regards, Viktor

 

Re: Postprocessor - Start of Sync Manager - mom_post_update_sync_manager - NX10.03.

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

What are you trying to accomplish?

Why do you need the info from the OTHER channels' sync codes?

 

I'm guessing each channel is posted in a separate "process", so the ENV variables don't carry over (nor do mom variables)

 

If you truly need this data, I would try writing to a (separate) text file during posting (maybe one per channel?) then parse as needed at start/end of program (or wherever) and set variables as needed.

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


Re: Postprocessor - Start of Sync Manager - mom_post_update_sync_manager - NX10.03.

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

Hi Ken_A,

 

it is not so easy to explain. 

 

One info to the env() vars, you can set an env() var in channel 1 and read the information in all other channels. 

This variables carry over in other channels.

So if you set env() vars in channel 3, you dont get them in channel 1/2 ... 

You will get the same results while posting a separate file. If you are in post_run 3, post_run 1 and 2 are finished.

 

Regards, Viktor 

Re: Postprocessor - Start of Sync Manager - mom_post_update_sync_manager - NX10.03.

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Perhaps I'm understanding better...

You need data from channel 3 when you post channel 1 or 2?

 

Personally, I would:

- Write the data for each channel to a (separate) file while it is being posted

- In the actual posted file, write a piece of "marker" text (e.g. "INSERT DATA 1 HERE") where you need data from the other channel(s)

- after all 3 channels are done, close the last output file

- Open the 3 "separate" files, read their data, load into tcl variables/arrays/lists/ whatever

- now open each actual posted code file, process (read/write to a temp file), replacing the text "INSERT DATA 1 HERE" with the data from the "separate"  file as appropriate.

- delete the posted code files, and rename the "temp" files to the desired filename.

 

As an example

- posted code goes into "CHANNELn.ptp" (e.g. "CHANNEL1.ptp")

- "separate" file data goes into "CHANNELn_DATA.txt" (e.g. "CHANNEL1_DATA.txt")

- read  all 3 (or whatever) "CHANNELn_DATA.txt" files

- open "CHANNEL1.ptp"

- loop thru, writing every line into "CHANNEL1.temp"  EXCEPT...

----- if line is "INSERT DATA 1 HERE", write data (from "CHANNELn_DATA.txt" files) as appropriate.

- After you are done creating all 3 "CHANNELn.temp" files

--- delete the "CHANNELn.ptp" files

--- rename the "CHANNELn.temp" files to "CHANNELn.ptp"

 

Does that make sense?

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


Learn online





Solution Information