02-08-2023 09:54 AM
Hi
We are trying to make the timestamps in the filenames of our TestStand xml reports follow the ISO standard regardless of the regional settings of the PC.
Good example:
2023-01-28_08 43 53_Demo Test Station - Main Sequence File_123_Failed.xml
Bad examples:
30 01 2023_19 40 56_Demo Test Station - Main Sequence File_123_Error.xml
12 15 2022_3 08 40 PM_Demo Test Station - Main Sequence File_123_Terminated.xml
One suggested solution is to use the ReportOptions callback:
https://forums.ni.com/t5/NI-TestStand/conditional-report-file-path/td-p/2892864
But a problem arises when running multiple DUTs in the same UUT loop. The Report Options callback executes only once, before the UUT loop. The result is that all DUT reports have the same timestamp.
I have searched online but not found solutions yet.
We do have our own sequential process model sequence file at our disposal to edit as needed.
I have tried to find out how and where to edit the process model but I have not yet found any good solutions.
I would be happy to hear if anyone has tips and suggestions.
Best regards,
Sebastian Bengtsson
02-09-2023 09:59 AM - edited 02-09-2023 10:17 AM
Hi Sebastian,
Have you tried adding the macro for UUT Serial Number? ... $(UUT) at the Report File Path Expression
When you add it, it will create a new report for each UUT that runs, at least with the original Sequence Model
I tried to guess using it with your FileName Convention at "Specify Report File Path by Expression" / "Report File Path" will be something like:
"$(ClientFileDir)\\$(FileTime)_$(FileDate)_$(ClientFileName)_$(UUT)_" + Str(!RunState.SequenceFailed) + "_$(Unique).$(FileExtension)"
Actually when you add it you will see diagram at the bottom part change as:
Configure / Result Processing.../ Options... / Report File Path Name / Generate Report File Path / Specify Report File Path by Expression
02-13-2023 01:41 AM
Hi LFBaute
Thanks for your reply.
Yes, this is my expression:
"$(TestStandPublicDir)\\CompanyName\\TestStandReports\\$(FileYear)$(FileMonth)\\$(FileDate)_$(FileTime)_$(ClientFileName)_$(UUT)_$(UUTStatus)$(Unique).$(FileExtension)"
This works well, except for the fact that the macros for date and time works differently in different parts of the world.
For example, some computers use AM/PM and some do not.
Our current solution is to make sure that the regional settings in Windows 10 are the same on all computers.
This is not a sustainable solution for us.
It would be preferred to be able to control the formatting of the file name.
By the way, we are using TestStand 2019 and LabVIEW 2018.
Best regards,
Sebastian Bengtsson
02-13-2023 07:46 AM
Ill take a look at time format,
Regarding "The result is that all DUT reports have the same timestamp."
Were you able to generate reports with different timestamp?
02-13-2023 07:58 AM
Yes, the macros work well. The reports all have different timestamps, as expected.
My earlier attempt was to not use the macros, and instead format the filename programmatically in the ReportOptions callback according to the marked solution here:
https://forums.ni.com/t5/NI-TestStand/conditional-report-file-path/td-p/2892864
This did work well as long as the operator only tested one DUT per "TestUUTs".
As mentioned, this callback is only called once before the UUT loop.
Since I need the UUT loop to work, I had to scrap that solution attempt.