06-20-2008 11:49 AM
06-22-2008 10:40 AM
Erik,
I have implemented all your recommendations:
-to remove ReleaseSequenceFileEx() call from PreUUT
-to save a reference to the client sequence file in a FileGlobals of ProcessModel file
-to release this reference in PostUUT.
It works fine, except for "Abort". In this case PostUUT and therefore ReleaseSequenceFileEx() is not called.
How to ensure GetSequenceFileEx()-ReleaseSequenceFileEx() calls balance for all cases?
Thanks,
Misha
06-23-2008 10:57 AM
FileGlobals.ClientParameters = "New Value",
FileGlobals.ClientFile = RunState.Engine.GetSequenceFileEx("d:\\temp\\B.seq"),
RunState.Execution.ClientFile = FileGlobals.ClientFile,
RunState.Engine.ReleaseSequenceFileEx(FileGlobals.ClientFile)
Hope this helps,This option will work even if your client files take different types of data as long as you set FileGlobals.ClientParameters correctly.
- To workaround a bug in TestStand, select the MainSequence Callback step and change the value of the Step.TS.SData.UsePrototype property to true. This is a hidden property so it is visible in the Variables pane only if you have Show Hidden Properties enabled in the Station Options dialog.
- Click on the Load Prototype button on the Module tab of the step settings pane and browse to B.seq and press OK.
- Type in FileGlobals.ClientParameters in the Value column for the parameter that was added.
09-25-2008 10:47 AM - edited 09-25-2008 10:50 AM
We have a similar requirement in our test solutions. We have the PreUUT to collect data and part of this included the client sequence file that should be executed for the supplied serial number. If the current ProcessModelClient is not the correct file we load the correct file using the TS API and change the Execution.ClientFile property to the new file.
There is additional data that is collected about the UUT that the test solution will need so we want to make this data available in the client sequence. We have found that we can edit RunState.ProcessModelClient.Data.Seq[\"MainSequence\"].Locals after we have checked and swapped the client file if required then we can happily delete and reinsert updated version of the locals in the client sequence. To make things simple we have defined a data type for all the UUT data that has an unstructured container within it to allow us to add new variables in the future without upsetting TestStand with a type change.
As I say this all works well as TestStand appears to take the current version of the ProcessModelClient's MainSequence each time TestUUTs makes the call. So if we change RunState.ProcessModelClient.Data.Seq[\"MainSequence\"].Locals in PreUUT the next iteration of the TestUUTs loop then the new values appear in the Locals of the client file.
The files in the attached zip can be added to you components\user\models folder and provide an cut-down example of what we are doing (set you model to PMSwapSequentialModel.seq). Yuo can start execution from any sequence file but the example always runs PMClient.seq and its locals are updated.
We do have a problem though and that is the Parallel and Batch models. This just will not work as there is only a single ProcessModelClient for all test sockets. Therefore you have no way to edit the Locals of each executions
I am still looking for a better way to manage the Client File and test data in our applications. Any suggestions welcome! Maybe a consideration for NI is to add unstructured container as a parameter for all MainSequence's. Then the process models could be updated to allow data be added to this container in PreUUT and then passed to the Client's MainSequence?
09-26-2008 03:07 PM