NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing testsocket UUT information in Batch model

Solved!
Go to solution

Hi,

 

I have a custom PreBatch callback in TS 4.0 that populates serial numbers, part numbers, etc. for the UUTs being tested (using a Batch model). These variables are found in the PreBatch parameters. However, I cannot figure out how to access these values in other callbacks (SequenceFilePostStepFailure, for example). 

 

In the PreBatch sequence, I can access the serial number for UUT4 using Parameters.ModelData.TestSockets[4].UUT.SerialNumber. But I cannot find the ModelData object when not in PreBatch and have tried looking in root, runstate, main, sequence, etc., without any luck.

 

Any thoughts?

 

Thanks,

Chris

0 Kudos
Message 1 of 4
(4,174 Views)
Solution
Accepted by topic author Tomahawk1277

You can find it at:

 

RunState.Root.Parameters.ModelData

 

It will only exist at runtime and only when you are actually running using the batch model.

 

Hope this helps,

-Doug

0 Kudos
Message 2 of 4
(4,173 Views)

Perfect, exactly what I needed. For others who come across this question: it only exists at runtime and therefore doesn't show up in TestStand's auto-complete when typing it in. But I ran it and it correctly accessed the variables.

 

Thanks Doug!

 

Chris

0 Kudos
Message 3 of 4
(4,167 Views)

Hi, 

  In Teststand 2012, Batch Model, I  try the solution in MainSequence unseccessfully !   

 As I run to the step to use "Runstate.root.parameters.ModelData.TestSockets[0].UUT.SerialNumber to Access the TestSocket_0 's  SerialNumber ,  An Error appears for unknowed parameter Runstate.root.parameters.ModelData  .    Does someone has a seccessful demo for it.

0 Kudos
Message 4 of 4
(2,386 Views)