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: 

Report Plugin: Chose ATML 2.02 want to create 2 files.

Solved!
Go to solution

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.

0 Kudos
Message 1 of 11
(4,961 Views)

Sorry, forgot to mention we are using TestStand 2012 SP1, Batch Model

0 Kudos
Message 2 of 11
(4,961 Views)
In Results Processing, you can select Options for each report, go to the Report File Pathname tab, and you can select Specific Directory in FileName/Directory Options. I did not notice the same behavior with the directory present or not but I may have some different settings somewhere.
Jason H
Automated Test Software R&D
0 Kudos
Message 3 of 11
(4,923 Views)

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.

0 Kudos
Message 4 of 11
(4,920 Views)
There may be something strange with the unique expression. If you would like them to go to different directories, why would you prefer to use the expression instead of specifying different directories for each? Could you possibly post your expression as well?
Jason H
Automated Test Software R&D
0 Kudos
Message 5 of 11
(4,896 Views)

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>\"" 

0 Kudos
Message 6 of 11
(4,883 Views)

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.

Jason H
Automated Test Software R&D
0 Kudos
Message 7 of 11
(4,857 Views)

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?

0 Kudos
Message 8 of 11
(4,840 Views)

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.

Message 9 of 11
(4,814 Views)

Attached is the ReportGenerator.seq.  UUT Start has the modifications

0 Kudos
Message 10 of 11
(4,807 Views)