07-15-2013 12:17 PM
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>\""
Solved! Go to Solution.
07-15-2013 12:39 PM
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.
07-17-2013 12:23 PM
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.
07-17-2013 12:35 PM
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"
07-17-2013 12:56 PM
That looks like it will solve the issue, thanks.