06-09-2010 08:10 AM
Hi,
Somewhere in the sequence I'm doing three tests by looping a group of steps using ForEach/End statement. One of these steps is a numeric limit test which measured data I'd like to check/get later on. If it had been a step without looping I'd have used the code like that:
RunState.SequenceFile.Data.Seq["TX Gain"].Main["ID#:V+IpmxTrKEKtowTTfXED+C"/* Unique Id of 'TX Gain' */].Result.Measurement["Measurement 0"].Data
However, how can distinquish the command above to query the data collected by first, second and third loop? I need to access all three results and, I don't want to create another variables.
Solved! Go to Solution.
06-09-2010 09:12 AM
06-10-2010 04:58 AM
Unfortunatelly it doesn't work.
Executing the code below:
RunState.SequenceFile.Data.Seq["TX Gain"].Main["ID#:V+IpmxTrKEKtowTTfXED+C"/* Unique Id of 'TX Gain' */].Locals.ResultList
I realised that the ResultList array is empty 😞
Does it matter that I'm calling it from another subsequence?
06-10-2010 06:09 AM
06-10-2010 06:11 AM
06-10-2010 06:55 AM
j_dodek wrote:
Why not using a variable ?
Because data is already in memory. You have just grab it. Why duplicate the same data?
06-10-2010 06:57 AM - edited 06-10-2010 06:58 AM
Ray,
Any word of explanation why I have to that this way? Why I need to add 'RunState.Caller.' prefix?
06-10-2010 07:06 AM
.. To keep it simple !
there are often more than 1 GB of RAM
doest it not make sense to spare some bytes for a variable for a few more readability ?
And for your task you need only one variable or best for saving RAM
i would use a reference to the stuff in memory.
Juergen
06-10-2010 07:14 AM
Like j_dodek says, unless the data you're dealing with is to the tune of a hundreds of megabytes, I wouldn't sweat duplicating it. KISS, as they say.
That said, to query the ResultList you're interested in, you can either pass the ResultList into your subsequence as a parameter or you can do as Ray suggested and use RunState.Caller. To get the ResultList, you would use RunState.Caller.Locals.ResultList.
06-10-2010 07:19 AM
Hi,
When you use "Runstate....." this is for the Sequence that is currently executing. when you make a SequenceCall (ie call a sequence) the RunState.DepthLevel increasing and the RunState.Caller.RunState is now the properties for the Caller Sequence and RunState becomes the properties for the called Sequence.
eg if a sequence called SequenceA is running which was called from MainSequence which was launched for the ProcessModel entry level Single Pass
RunState.SequenceFile.... is for the currently executing "Sequence A"
RunState.Caller.RunState.SequenceFile.. would be for "MainSequence"
RunState.Caller.RunState.Caller.RunState.SequenceFile.... would be for "Single Pass "
Hope this helps
Regards
Ray Farmer