NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating Multiple Reports in Subdirectories with Nested Sequence Calls

Solved!
Go to solution

I would like to generate different pathnames for multiple sequences, which are each run under their own execution.  The following displays the desired heirarchy:

YYYY.MM.DD.HH.mm.ss_MainSequenceFileName\Test Summary.html
YYYY.MM.DD.HH.mm.ss_MainSequenceFileName\YYYY.MM.DD.HHmm.ss_SequenceGroup1\Sequence Group Summary.html
YYYY.MM.DD.HH.mm.ss_MainSequenceFileName\YYYY.MM.DD.HHmm.ss_SequenceGroup1\Test n.html
YYYY.MM.DD.HH.mm.ss_MainSequenceFileName\YYYY.MM.DD.HHmm.ss_SequenceGroup2\Test n.html

where:

Test Summary only contains the steps of the MainSequence from the MainSequenceFile
SequenceGroup1 is a sequence call step in MainSequence with a new execution (to generate a separate report).
    Note: The SubSequences of the SequenceGroup  are stored in a different sequence file.

    
Example Hierarchy:
MainSequence -> SequenceGroup1 -> SubSequence1, SubSequence2, SubSequence5
MainSequence -> SequenceGroup2 -> SubSequence2, SubSequence3, SubSequence4

Would result in the following files:
2010.08.18.10.00.00_MainSequenceFile\Test Summary.html
2010.08.18.10.00.00_MainSequenceFile\2010.08.18.10.05.00_SequenceGroup1\SequenceGroup1 Summary.html
2010.08.18.10.00.00_MainSequenceFile\2010.08.18.10.05.00_SequenceGroup1\Test1.html
2010.08.18.10.00.00_MainSequenceFile\2010.08.18.10.05.00_SequenceGroup1\Test2.html
2010.08.18.10.00.00_MainSequenceFile\2010.08.18.10.05.00_SequenceGroup1\Test5.html
2010.08.18.10.00.00_MainSequenceFile\2010.08.18.10.40.00_SequenceGroup1\SequenceGroup2 Summary.html
2010.08.18.10.00.00_MainSequenceFile\2010.08.18.10.40.00_SequenceGroup1\Test2.html
2010.08.18.10.00.00_MainSequenceFile\2010.08.18.10.45.00_SequenceGroup1\Test3.html
2010.08.18.10.00.00_MainSequenceFile\2010.08.18.10.45.00_SequenceGroup1\Test4.html

 

 

My plan was to specify the base path using the StationGlobals (for support across multiple files) and then utilize the ReportOptions callback in the Main Sequence File and the Group Sequence File.  However, the ReportOptions Callback only occurs in the Main Sequence file.  If I create a ReportOptions callback in the SubSequence File, it is never called.  The ReportOptions callback from the MainSequenceFile is only called (since that is where the new execution is launched I assume).

I believe this hierarchy could be created using the following:
In the ReportOptions callback, obtain a reference to the calling sequence step and determine if it is a SequenceGroup_SequenceCall (a special step type I created), if so then use a different expression to generate the subdirectory and report name.  If not, then use the main sequence expression.

This would require the following from the ReportOptions Callback in MainSequence:

1. Obtain reference to MainSequence Report Path generated from the Process Model.  This could be done by storing the RunState.Root.Locals.ReportPath in a StationGlobals variable before the new sequence call.

  •    Is there a way to do this without StationGlobals?  Is a SequenceCall parameter more appropriate?

2. Obtain reference to calling sequence step

  •    Not sure the best method of doing this.  Please advise.

3. Date Format
The Get Start Time statement of the SequentialModel is not called until after the ReportOptions Callback and the Determine Report File Path Expression.  Therefore the timestamp of the report filename may be different than the report header.

  • Why isn't the Get Start Time statement called as the first step in the sequence and what are the consequences of changing this in the Sequential Model?

 

My questions are indicated by bullets above.  Any help would be greatly appreciated!

CLA, CTA
0 Kudos
Message 1 of 10
(5,197 Views)

Hi,

 

I try to keep it short.

What about the serialnumber ?

 

Juergen

 

 

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 10
(5,176 Views)

 


I try to keep it short.

What about the serialnumber ?


What about it?  I don't mention a serial number anywhere in the original post.

 

CLA, CTA
0 Kudos
Message 3 of 10
(5,170 Views)

Hi,

 

well, if no serial number is requiered, i would do your task in this way:

 

Everytime when a new report file is requiered, i would call the corresponding subsequence in the main as a new execution with "Single Pass" as entry point.

Now all the report stuff is automatically done by the model.

Maybe this thread is also interesting for you :

http://forums.ni.com/t5/NI-TestStand/rename-report-file/m-p/821696#M22384

 

Hope this will help,

unless this is an other kind of solution you are asking for

 

Juergen

 

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 4 of 10
(5,148 Views)

 


@j_dodek wrote:

Hi,

 

well, if no serial number is requiered, i would do your task in this way:

 

Everytime when a new report file is requiered, i would call the corresponding subsequence in the main as a new execution with "Single Pass" as entry point.

Now all the report stuff is automatically done by the model.

Maybe this thread is also interesting for you :

http://forums.ni.com/t5/NI-TestStand/rename-report-file/m-p/821696#M22384

 

Hope this will help,

unless this is an other kind of solution you are asking for

 

Juergen


 

Juergen, thanks for the reply but your response does not address my questions.  I am already calling the sequences in a new execution, but had questions in regards to the Sequential Model and passing references between Executions without StationGlobals.  My questions are indicated by bullets in the original post:

 

1. Obtain reference to MainSequence Report Path generated from the Process Model.  This could be done by storing the RunState.Root.Locals.ReportPath in a StationGlobals variable before the new sequence call.

  •    Is there a way to do this without StationGlobals?

2. Obtain reference to calling sequence step from a new execution

  •    Not sure the best method of doing this.  Please advise.

3. Date Format
The Get Start Time statement of the SequentialModel is not called until after the ReportOptions Callback and the Determine Report File Path Expression.  Therefore the timestamp of the report filename may be different than the report header.

  • Why isn't the Get Start Time statement called as the first step in the sequence and what are the consequences of changing this in the Sequential Model?
CLA, CTA
0 Kudos
Message 5 of 10
(5,144 Views)

Hi,

 

Which entry point are you using.?

 

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 6 of 10
(5,141 Views)

Hi

 

1 -3 for this you could use a queue step

 

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 7 of 10
(5,140 Views)
Solution
Accepted by LVB

Hi

 

I have created a small example which should full-fill your demands.

Note: I have only tested it in Single Pass Mode (No Serialnumber demand!!)

 

No StationGlobals where used. To get parent folder data two queues where used in ReportOption Callback

 

Hope this helps

 

Juergen

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 8 of 10
(5,131 Views)

Juergen,

 

Thank you for the response.  Your example is very helpful and Queues will work very well for this application

.

I will do some reading on "Appendix B, Synchronization Step Types" of the NI TestStand Reference Manual.

 

 

Regards

CLA, CTA
0 Kudos
Message 9 of 10
(5,111 Views)

Also an FYI, I had to rename the attachment from Multi.rar.zip to Multi.rar (it is actually a .rar).

CLA, CTA
0 Kudos
Message 10 of 10
(5,108 Views)