02-06-2013 12:07 PM
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?
02-07-2013 05:52 PM
Is there a reason why you are not using StationGlobals in this case?
02-08-2013 01:19 AM
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
02-08-2013 07:53 AM
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.
02-08-2013 08:11 AM - edited 02-08-2013 08:11 AM
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.
02-08-2013 10:09 AM - edited 02-08-2013 10:13 AM
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.
02-08-2013 11:25 AM - edited 02-08-2013 11:26 AM
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).
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.
02-08-2013 12:09 PM
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.