NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to pass parameters to sequences called as new execution

Hi community,

 

I have a "test"sequence which has to be called several times under different environmental conditions and the runs should create individual log files. I have learnt that the only way to do this (without serious work on the station model) is to create a "Framework" sequence which makes the decision when should the "test" sequence needs to be called. So far easy, but as I need individual log files I need to call my test sequence in a "new execution".

 

I get separate report files for each execution of the test sequence which is great but by calling the test sequence in this way I lost the option to pass parameters to the test sequence, which is quite painful as I really need to pass data from my framework sequnce to the test sequence.

 

My question is: what would be the best way to address this problem?

 

thanks!

0 Kudos
Message 1 of 8
(3,844 Views)

New Execution works with a separate report only if you use a process model for this new execution. If you have configured in the report option that each execution creates an unique report, you should be good already.

You can also choose to Specify Report File Path by Expression so you can use the advantage of expressions to determine a file path/name dynamically when the new execution starts.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 8
(3,837 Views)

Where is this setting can be found exactly? To make life a bit more complicated the test sequence I use currently calls the "ModifyReportHeader" and the "ReportOptions" callbacks in order chanage the default report file name path and to add some more results to the top section of the report files.

 

I can see the "specify report file path by expression" can be used to set up the filename - which is great - but I dont understand how should I call my "test" sequence in order to generate a separate report instead of reporting to under the report of the framework sequence.

0 Kudos
Message 3 of 8
(3,832 Views)

Report path configuration is done in the Report Options dialog:

Report Expression.png

 

Unless you are using the ReportOptions callback to completely replace this configuration, this is the recommended way to solve your requirement.

 

Each execution has its own data set (SequenceContext). Therefore, above displayed configuration is unique for each execution if you add unique elements to the expression (e.g. time stamp). By default, each execution has its own report file by this approach.

ModifyReportHeader has no effect on this (unless you have some "hacks" in there) as it is meant to alter the report file content by design, not to change the location/name of the report file.

 

Configure your sequence call step to use a process model for execution:

Sequence Call.PNG

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 8
(3,816 Views)

Uhm... my problem is not how to get separate log files. Thats already done and working fine. My problem is that if I call my "test" sequence(s) from the "framework" sequence with the new execution option then I can't pass parameters from the framework to the test sequence.

 

If I call the test sequences with the "none" option then I can pass the paramters, but can't get an individual log files for the each execution of the test sequences.

 

So referring to your screenshot: I am calling my test sequence like you did, using the sequential model and the Single Pass  entry point. In the bottom section I enter "MainSequence" as thats the entry point of my test sequence. The issue again is that the MainSequence of my test sequence has parameters which dont show up, so I can't pass them from my framework.

 

(I use the ReportOption callback to change the path of the report file and the ModifyReportHeader callback to add some custom data to the report. Both of these callbacks have couple steps only and no "hacks".)

0 Kudos
Message 5 of 8
(3,808 Views)
Message 6 of 8
(3,784 Views)

Hi,

 

maybe there are some other solutions for your task.

 

1.) If executions are using the !!same!! SequenceFile. Just enable "All  Executions share the FileGlobals" in SequenceFile properties.

2.) Most times I use a Queue StepType for shareing data between SequenceFiles.

 

Hope this helps

 

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 7 of 8
(3,739 Views)

Thanks to both of you for the useful infos!

0 Kudos
Message 8 of 8
(3,723 Views)