NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Sharing data across TestStand sequences

I am trying to implement this, but I am apparently missing something.  I have gone to the "Test UUTs - Test Socket Entry", turned on the flag: "Propagate to Subsequence" on the local container UUT.  I put a BreakPoint at the MainSequence Callback, and the flags are not set when run.  I can set them on the variable at this point, and it propogates to the MainSequence in my client file. 

 

What am I missing, to have it propogate?

0 Kudos
Message 11 of 18
(2,271 Views)

Is there a reason why you are not using StationGlobals in this case?

Ian M.
National Instruments
Message 12 of 18
(2,249 Views)

Hi Lanidas300,

 

I would say avoid the use StationGlobals as far as possible. I think most of the forum's writer will agree this.

I am using this variables ONLY to describe static stuff like machine configration. I never use it as dynamic container,

because after execution the values are retained!  Another thing why you should not use it as container for sharing data,

this variabales are stored on a special file, which is TS version dependend! If you dont take care your stuff will not run on

other versions at once. Conclusion: Storing sequence data to station globals will lead step by step to station globals hell,

because no one else understands the use of this variables in other or future projects.

 

For sharing data across sequencefiles or even maschines i am using queues.

but for this task here (accessing the process model) i would use for accesing variables from the model Runstate.Root.Locals.xxx

or Runstate.Root.FileGlobals.xxx

 

Regards

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 13 of 18
(2,238 Views)

We discussed this and because StationGlobals keeps the values until changed, didn't think that was the way to go.  I was reading through this message thread and thought that persisting local variables might be the way to go.

 

It apears to work, but only if I break at the MainSequence call and reset the Propogate to SubSequence on the variable at runtime.  Is there information on Propogating?  Doesn't seem to be working in TS 2012, unless I am misunderstanding the use.  I am right clicking the variable, selecting Propogate to SubSequence, but it isn't selected when runnning the sequence.

 

Joe H.

0 Kudos
Message 14 of 18
(2,229 Views)

lanidas300

I decided to try the same approach in TS 2010, and it actually appears to work (as long as the variable does not exist in the client).  Why would it work differently in TS 2010 and TS 2012?  Checking Propgate to SubSequence, the variable appears in the locals of the client file.

0 Kudos
Message 15 of 18
(2,223 Views)

jhedr,

 

I tried the same steps as you described using the Batch Model and everything works for me. I see propagated local UUT in Watch View both at breakpoint in MainSequence call in the model's entry point and in the client sequence itself. Are you sure you set the Propagate to Subsequence in the right place? Say, just as example, if you have it set in "Test UUT - Test Socket Entry Point" but run Single Pass, then you won't have the variable at runtime.

I'm using TS 2010 SP1. If what you say is true for TS 2012, then I'll be in trouble.

0 Kudos
Message 16 of 18
(2,215 Views)

Hi,

 

This behavior is occurring because the TestStand 2012 implementation of Single Pass -- Test Socket Entry Point contains a step, Create Local UUT Alias, which replaces the local variable with an alias to the UUT container in parameters (Parameters.TestSocket.UUT).  

 

2013-02-08_112307.png

 

This operation removes any flags present on the local.  To make sure the flag is set, you can programatically set it after this copy operation completes, using the following TestStand API call in an expression step:

 

Locals.UUT.SetFlags("", 0, 0x100)

If you are using other flags on the locals.UUT property, you may want to implement something that gets the flags before the replace operation using the GetFlags method, then resets the flags to the original state after the replace operation.  note that setting flags for the Parameters.TestSocket.UUT will not work, since these flags are not copied to the local.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
Message 17 of 18
(2,199 Views)
Al.B,
Thank you for the information, I implemented setting the flag as you state and it is now working.  Not sure I am going to stay with this approach, but at least I now know how to get propagation working if needed.
Joe H.
0 Kudos
Message 18 of 18
(2,192 Views)