NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I achieve, that reports are written to a subdir of the current testsequence path ?

Hi Maschin,

I've a attached a simple example that will alter the path that reports are written too.

In the Callback sequence, the sequence path is obtained from the RunState.SequenceFile.Path. This is the full pathname to the sequence file loaded so the filename has to be stripped from the pathname. I've used a LabVIEW VI to strip the filename and return the result. I then append the required sub folder, found in the local.subdir variable. This is written to the Parameters.ReportOptions.Directory variable.

This is not the only solution you can use. I've used the ReportOptions Callback to modify the ReportOptions container. I also modify the Report Options Directory Type.

This example uses TestStand 2.0 and Labview 6.0.2

Hope it is of some help.
Regards
Ray Farm
er
Regards
Ray Farmer
0 Kudos
Message 2 of 6
(3,870 Views)
Hi,

Just follow the steps below in customizing your TestStand ProcessModel:

1. Copy the ProcessModel from "\Components\NI\Models\TestStandModel\TestStandModel.seq" to "\Components\User\Models\TestStandModel\TestStandModel.seq"

2. Open in SequenceEditor the "\Components\User\Models\TestStandModel\TestStandModel.seq"

3. Select the "Test UUTs" execution entry-point from the "View:" drop-down list located on the top-right

4. In the sequence viewer select the "Main" tab

5. Locate the step named "Determine Report File Path" and open its "Properties" dialog (press Alt+Enter)

6. In the "Properties" dialog select the "Expressions" tab

7. Insert the following expression in the "Post Expression" section and press "Ok" button

8.
In the sequence viewer select the "Locals" tab

9. Insert a local variable of type string named "SubdirName" and give it the name of the Subdir you want the reports to be written to

10. Repeat steps 3 to 9 for "Single Pass" execution entry-point

11. Save and close the "TestStandModel.seq" and run your client sequences

The attached file is the TestStandModel.seq modified as described above. Just save it in the "\Components\User\Models\TestStandModel" folder and that's it.


Regards,
Silvius
Silvius Iancu
0 Kudos
Message 3 of 6
(3,870 Views)
OOPS... It's me again 'cause I've forgot to write the expression in step 7. from my answer. Just replace step 7. with this one:

7. Insert the following expression in the "Post Expression" section and press "Ok" button

FindAndReplace( Locals.ReportFilePath, "\\","\\" + Locals.SubdirName + "\\", 0,0,1,1)

That's all,
Sorry, Silvius
Silvius Iancu
0 Kudos
Message 4 of 6
(3,870 Views)
Thanks, that helped !

Greetings,
Manfred
0 Kudos
Message 5 of 6
(3,870 Views)
Hi Silvius,

That's another way.

But, the idea of the Override Callbacks is so you dont have to modify the Station Model sequence. Remember once you have change the Station Model, it affects all Sequence file, that use the process model when executed. Using the Callbacks each new sequence file can control its own destiny.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 6 of 6
(3,870 Views)