Cancel
Showing results for 
Search instead for 
Did you mean: 

Getting variables from one channel in one another by two channels postprocessing

Creator
Creator

Hello all!
Hallo zusammen!

 

I have one question about two channels postprocessing.

Is it possible to see variables from one channel in one another channel and
get their values?

 

I write a postprocessor for a two channel machine at this time and
need to see some UDE variables and get their values at second channel, but issue is, that
my UDE has to be added to first channel only, due to machine programming features.

 

Some info about post:
My postprocessor is a MILL-post, which can output TURN commands also.
So I don't use primary and secondary postprocessors.

 

And as I can see from a debugger, NX runs my post two times but not simultaneously.
Second channel Post Review Tool outputs it's data a few seconds later after first channel does it.
Thats why I think, that it may be possible to get values of desired variables.

 

I hope, if anybody can answer my question.
Ashot.

"Imagination is more important than knowledge" - Albert Einstein
5 REPLIES

Re: Getting variables from one channel in one another by two channels postprocessing

Esteemed Contributor
Esteemed Contributor

As far as I can tell, there is no direct way to get most variables across.

 

There are a couple techniques I've thought of, one of which I use:

 

1) Sync mark text (I've used this) - the sync code (and wait code?) events will be common to both channels.  This can be used for some primitive communication.

 

2) Have the first channel write data to a file, then the second channel read that file.  Note you will have to add some "timing" marks (e.g. the sync codes) to know WHEN the data should be used by the other post.

 

Maybe someone else has a better idea?

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: Getting variables from one channel in one another by two channels postprocessing

Phenom
Phenom

It has been a long time but when I last had to do this - there was a way. Maybe something with "::" or a env(xxx) variable. You could try setting like this:

 

set env(MY_ENV_VAR) 1234

 

And look for it in the next post run.

NX10.03
Windows 7 Pro

Re: Getting variables from one channel in one another by two channels postprocessing

Creator
Creator

Hello Ken_A,

hello Study!

 

First of all thank you very much for your help!

 

I have tried env(VARIABLE_NAME) and it works.

Now I can manage my UDE variables from first channel in second channel.

 

And of course, as Ken_A had mentioned in his message, it is necessary to note a moment,

when should we use our data.

 

Once more thanks for your attention and help!

Ashot.

 

"Imagination is more important than knowledge" - Albert Einstein

Re: Getting variables from one channel in one another by two channels postprocessing

Esteemed Contributor
Esteemed Contributor

Does the ENV() persist across post runs?

I.e. I post from Sync manager dialog

- channel 1 defines ENV

- channel 2 uses ENV (but does not clear/delete it)

If I then post again from sync manager dialog

- does channel 1 see the ENV from the previous run?

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: Getting variables from one channel in one another by two channels postprocessing

Creator
Creator

Yes, the env(ARRAY_ELEMENT_NAME) persists across post runs and Channel 1 sees it from the previous run.

If one doesn't unset this array element at some Proc in post, one has to reload not only Sync Manager, but also NX app, to unset it.

 

Thus one should check existence of array element and unset it, to prevent a missuse of this data.

 

Unsetting can be performed at any Proc, attached to last event MOM_end_of_program.

One should check before unsetting also, that variable $mom_multi_channel_mode exists and it is postprocessing Channel 2 ($mom_run_number == 2).

 

 

"Imagination is more important than knowledge" - Albert Einstein

Learn online





Solution Information