07-23-2015 11:20 AM
Hi,
I'm trying to change the Results File Pathname depending on the sub sequence that has been selected i.e.
\\ Root
SG. ResultPathname = "C:\Results"
Main Seq
TestSeq1 --> SG.ResultsFile = "TestSeq1"
TestSeq2 --> SG.ResultsFile = "TestSeq2"
TestSeq3 --> SG.ResultsFile = "TestSeq3"
I thought this would be easy - Report Options - Report File Pathname - Specify Report File by Expression as:-
Report File Path - SG.ResultsPathname + "\\" + SG.ResultsFile + '\\" + "SN_" + "$(UUT)"
This does not work as the Results File Pathname is required Prior to running my Main Sequence!
Is there a method of changing the Results File Pathname once the sub-sequence has been selected?
Regards...
Ian
08-04-2015 03:59 AM
Hi ian_f,
I think you're along the right lines by looking at Specifying Report File Paths by Expression. This is a help article referring to TestStand 2012 but it still applies to TestStand 2014 which you may find useful:
http://zone.ni.com/reference/en-XX/help/370052K-01/tsref/infotopics/specifyreportfilepath_byexpressi...
I understand the specific issue you're having is that the Results File Pathname is being read before the Main Sequence runs, and your Main Sequence is what determines the Results File Pathname.
An approach you could try is using station globals added to the report path (see the first example in the linked article).
From here you'll need to make sure that TestStand re-evaluates the resulting expression. If you use the <UUTStatus> macro then this will be done by default.
However, you can also go into NI_ReportGenerator.seq (Program Files\National Instruments\TestStand 2012\Components\Models\ModelPlugins) and edit the first If statement to check regardless by changing the second condition to true (Parameters.ModelPlugin.PluginSpecific.RuntimeVariables.GeneratePathByExpression && True).
You could also set the report path in the NI_ReportGenerator, but I believe editing from the configuration tab will be easier in the future.
Please let me know if this approach helps you at all.
Kind regards