Hi lynx,
if you have a look at the way in which the parallel and batch process models work, they're a two stage process model, i.e. the process model sequence your (main) sequence sees is called by an another process model. In this case, RunState.Caller on it's own only takes you up one level, but RunState.Caller.RunState.Caller will take you to the top level process model. When dealing with multi-UUT models, it depends on which serial number you're after (parallel serial numbers are stored in the TestUUTs model entry point->Locals.ModelData.TestSockets[0].UUT.SerialNumber
where the [0] signifies the testsocket you're looking at (i.e. if it's the third testsocket, use [2].)
batch serial numbers are stored in the same place, with the addition of the BatchSerialNumber (i.e. TestUUTs model entry point->Locals.ModelData.TestSockets[0].UUT.BatchSerialNumber, however there is also a BatchSerialNumber in TestUUTs model entry point->Locals.ModelData.BatchSerialNumber which is the same as the above one.
You can always use the RunState.Root to get to the main calling process model, and in the case of the parallel and batch process models, the serial numbers are passed down from the top level execution entry point anyway into RunState.Root.Parameters.ModelData.TestSockets[0].UUT.SerialNumber
(otherwise, if you're very buried in sequences, i.e. your mainsequence calls another which calls another etc etc, your call gets longer and longer - in cases like this I tend to use a Parameter, and pass the serial number down through the levels)
If you want the data as if it came from the top level, since the LabVIEW adapter needs to see the data in a particular place, you can also use
RunState.Root.Locals.UUT.SerialNumber.
The quickest way I've found to find stuff is to create a new sequence file with just a label step in it. Set the sequence file to use the appropriate process model you're interested in, and set the label step to a breakpoint. You can then look at the context tab once you've set the sequence running from your desired execution entry point, and browse away.
There's some great documentation in
\Components\NI\Models\TestStandModels\TestStandProcessModels.PDF
explaining how the process models actually work.
A word of warning though - if you decide to change the serial numbers on the fly (one particular case is if you needed a bar code serial number which included information on failures for example), because the serial number is available in several places, you need to check where the report generation is picking up it's serial number information from.
Hope that helps
Sash.
// it takes almost no time to rate an answer