10-25-2024 02:23 PM
I am trying to run a batch test with Test Stand 2019 but I cannot get four separate reports for each of my UUTs. The model Plugin that I am using works for a single UUT but not for multiple. The section that is failing is Model Plugin-Batch Start.
I am getting this error:
I do not know what array it is referring to. It might be RunState.TestSockets.MyIndex but I do not know. I do not know how to convert this to a batch test.
Solved! Go to Solution.
10-26-2024 09:30 PM
The callback "Model Plugin - Batch Start" is called from the Batch model once from the batch controlling execution, and not from the individual batch test socket executions, so the value of "RunState.TestSockets.MyIndex" is -1 as the error suggests and the "Parameters.ModelPlugin.PluginSpecific.RuntimeVariables.PerSocket" array size starts at 0 and is TestSockets-1. If your code needs to setup a separate database per socket, you will need to loop on the said step equal to the number in RunState.TestSockets.Count.
10-28-2024 08:38 AM
Thank you for the reply. I am relatively new to test stand.
So, I would need to create a for loop in the Setup to run the function "Setup SQLite Database FileName" the same number of times that is equal to the number of sockets that I have which is 4?
Would I need to change any of my expression:
Locals.SQLitePath = "[" + #NoValidation(Mid(Parameters.ProcessModelClientPath, Find(Parameters.ProcessModelClientPath, "\\", 0, False, True) + 1)) +"][" + Date() + "][" + Time() + "]["
+ Parameters.UUT.SerialNumber + "]["
+ RunState.Sequence.Parameters.UUT.BatchSerialNumber + "].db",
Locals.SQLitePath = SearchAndReplace(Locals.SQLitePath,"/", " "),
Locals.SQLitePath = SearchAndReplace(Locals.SQLitePath,":", " "),
Locals.SQLitePath = Parameters.ModelPlugin.PluginSpecific.Options.SQLite_ResultsDirectory + Locals.SQLitePath,
Parameters.ModelPlugin.PluginSpecific.RuntimeVariables.PerSocket[RunState.TestSockets.MyIndex].SQLite_ReportPath = Locals.SQLitePath
10-28-2024 09:06 AM
I added the for loop to the setup to run as many as RunState.TestSockets.Count however it is still failing for the same reason.
Would I need to put a lock/unlock on the "main" due to it being a batch test to make sure one runs at a time?
10-28-2024 10:47 AM
I think I got it to work. I had to change "RunState.TestSockets.MyIndex to "Parameters.UUT.TestSocketIndex" and put a for loop around my setup and my main.
10-28-2024 10:58 AM - edited 10-28-2024 11:03 AM
@Ken188 wrote:
I added the for loop to the setup to run as many as RunState.TestSockets.Count however it is still failing for the same reason.
You have the exact same error message? If you have the same error message, please note that you cannot use RunState.TestSockets.MyIndex during Model Plugins - Batch Start. If your error is different, then please post the new error details.
Edit: Looks like you corrected your issue before I had finished my post.