01-21-2014 03:19 PM
I setup the Configure Results to create 2 Reports, both are ATML 2.02 and Unique File name is enabled. If the directory does not exist, it is created but only 1 file is generated. If the directory exists, then 2 files are created with the second file having the 001 appended. Why does it only create the second file if the directory exists prior to testing?
I need to duplicate the file and this seemed to be the easiest way, but would prefer the file to be in a different directory.
Solved! Go to Solution.
01-21-2014 03:19 PM
Sorry, forgot to mention we are using TestStand 2012 SP1, Batch Model
01-22-2014 03:04 PM
01-22-2014 03:33 PM - edited 01-22-2014 03:33 PM
We are generating the Report File Path by Expression. The Expression is the same for both files, with the <Unique> expression.
Creates the directory, and with breakpoints I see it entering the Sequence twice. Only get 1 Report until the directory has been created.
Switched to SequentialModel.seq and saw the same results.
01-23-2014 06:11 PM
01-24-2014 08:34 AM
I had to add into the NI_ReportGenerator.seq, Model Plugin - UUT Start because the variables are not available until after the data is entered in Batch Start.
2 CCAs being tested as 1 UUT:
Parameters.ModelPlugin.PluginSpecific.Options.ReportFileBatchModelExpression ="\"<ClientFileDir>\\\\..\\\\Data\\\\"+ Parameters.UUT.ModuleType +"\\\\"+ StationGlobals.JSFPNR.TestType +(Parameters.UUT.ModuleType ==""?"Reports\\\\<UUT>\\\\":"\\\\Reports\\\\<UUT>\\\\")+ Parameters.UUT.ModuleType +"_MSN[<UUT>]-TR2_"+ StationGlobals.JSFPNR.TestType +"_PN["+ Parameters.UUT.PartNumber +"]_"+ Parameters.UUT.ModuleType +"_MSN["+ Parameters.UUT.SerialNumberB +"]-TR2_"+ StationGlobals.JSFPNR.TestType +"_PN["+ Parameters.UUT.PartNumberB +"][<FileTime>][<FileDate>]<Unique>.<FileExtension>\""
01-27-2014 09:21 AM
You could specify a different directory in the second expression. I think what might be happening is a race condition. Since both are in their own thread, they could be executing at the same time. As they are both the same report, one overwrites the other and there is no discernible difference. I am still not sure why it would create the second file only if the directory exists.
01-28-2014 06:36 AM
I was thinking it might be a race condition, and maybe if the directory exists it leaves a trail or temporary file so that it can detect that one exists. I know the documentation says ATML must create separate files.
The expression is using Variables, setting up the expression in the Report Options does not get me the filenames that I desire. I had to put this into the ReportGenerator.seq. How would I differentiate between Report Threads for the same socket?
01-29-2014 10:29 AM - edited 01-29-2014 10:30 AM
Hey jhedr,
There is a lock in the ReportGenerator sequence to prevent the race condition, but it's only on certain steps so we might want to verify that your custom path is using the lock functionality. Could you post a screenshot of where you inserted the code in the ReportGenerator sequence, or attach your version of the sequence? We haven't yet been able to reproduce this on our end, but I'd like to look at it and figure out what's going on if we can get a bit more information about how you implemented this.
01-29-2014 10:58 AM
Attached is the ReportGenerator.seq. UUT Start has the modifications