From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand 2012, BatchModel Result Processing intermittent problem.

Solved!
Go to solution

While running the BatchModel the Results are suppose to be going to separate directories for each Socket.  What we are seeing is that intermittently the Path is not correct for some sockets, ie the results for a socket will be written to the wrong socket directory.

 

What could be causing the sockets to generator the incorrect path?

 

To get the path and filenames the following was added to UUT Start, in NI_ReportGenerator.seq: 

 

Parameters.ModelPlugin.PluginSpecific.Options.ReportFileBatchModelExpression ="\"<ClientFileDir>\\\\..\\\\Data\\\\"+ Parameters.UUT.ModuleType +"\\\\"+ StationGlobals.JSFPNR.TestType +(Parameters.UUT.ModuleType ==""?"Reports\\\\":"\\\\Reports\\\\")+ Parameters.UUT.SerialNumber +"\\\\"+ Parameters.UUT.ModuleType +"_MSN[<UUT>]-TR2_"+ StationGlobals.JSFPNR.TestType +"_PN["+ Locals.UUT.PartNumber +"][<FileTime>][<FileDate>]<Unique>.<FileExtension>\"",

 

Parameters.ModelPlugin.PluginSpecific.Options.BatchFileBatchModelExpression ="\"<ClientFileDir>\\\\..\\\\Data\\\\"+ Parameters.UUT.ModuleType +(Parameters.UUT.ModuleType ==""?"Reports\\\\":"\\\\Reports\\\\")+"BatchReport[<FileTime>][<FileDate>]<Unique>.<FileExtension>\""

0 Kudos
Message 1 of 5
(3,461 Views)

I don't know what is happening, but I did notice that the Determine Report File Path and Determine Report File Path Expression steps in the default NI_ReportGenerator.seq both acquire the "TestStand - Determine Report File Path Mutex" lock. You might want to try doing the same for your modifications if you haven't already.

0 Kudos
Message 2 of 5
(3,459 Views)

I believe the issue is that the "Parameters.ModelPlugin.PluginSpecific.Options.ReportFileBatchModelExpression" is common between all threads/sockets.  This means it is getting overwritten by each thread to generate the path I need, but if it doesn't run the "Determine Report File Path Expression" before the next socket then the value gets overwritten.

0 Kudos
Message 3 of 5
(3,430 Views)
Solution
Accepted by topic author jhedr

Can you insert Lock steps to acquire and release the "TestStand - Determine Report File Path Mutex" lock around the step you added AND the existing report file determination steps so that the report file expression values are not modified by a socket while still being used by another socket?

 

Lock: Acquire "TestStand - Determine Report File Path Mutex"

<your step>

<existing report file path steps>

Lock: Early Unlock "TestStand - Determine Report File Path Mutex"

0 Kudos
Message 4 of 5
(3,427 Views)

That looks like it will solve the issue, thanks.

0 Kudos
Message 5 of 5
(3,421 Views)