NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I select the filename, in which the results are stored, dynamically?

I want to change record file name several times in a TS execution using "statements".
Which variable should i change in the statement? And what should i do to access that variable?
Thanks a lot.
 
Baris
0 Kudos
Message 1 of 6
(3,493 Views)
Hi,
 
You can use a settings in the Report Options to make each execution different.
Dynamically you can use the Callback sequence ReportOptions to do this. In the Using Manuals and the Reference Manual is chapters regarding the Report Options and the callback sequence. I think there is an example in the TestStand examples folder.
 
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 6
(3,490 Views)

Sorry for the time gap...

Yes, I should use Report Options callbacak but i cannot understand how.

I have added ReportOptions callback into my sequences. First of all, why is (is it) the ReportOptions sequence empty when i select it in the "View"  menu. Just the parameters can be seen. Does it mean what was done normally when ReportOptions is not added will not be done anymore, since the sequence is empty? Or, are the operations normally done but hidden from the user?

Secondly, i can guess that the parameter i should change is the "Parameters.ReportOptions.ReportFilePath" but it is only available in the ReportOptions sequence. I think that i should be able to have it in the MainSequence (or in any of my subsequences) because there is the place i want to modify the report file.

I hope i could tell what my problem is. Thanks for your attention.

Best Regards

Baris

 

0 Kudos
Message 3 of 6
(3,450 Views)

Hi,

 


@sansar wrote:

Yes, I should use Report Options callbacak but i cannot understand how.

I have added ReportOptions callback into my sequences. First of all, why is (is it) the ReportOptions sequence empty when i select it in the "View"  menu. Just the parameters can be seen. Does it mean what was done normally when ReportOptions is not added will not be done anymore, since the sequence is empty? Or, are the operations normally done but hidden from the user?


Not all Callbacks actually do anything, and this is one of them. But you can see if it has any steps by looking at the original in the Process Model Sequence File - "SequentialModel.seq". On the other hand, if it did have some steps, such as the PostUUT, there is a setting, I think its in the Preferences, that will copy the exact Callback instead of creating an empty one.

 


@sansar wrote:

Secondly, i can guess that the parameter i should change is the "Parameters.ReportOptions.ReportFilePath" but it is only available in the ReportOptions sequence. I think that i should be able to have it in the MainSequence (or in any of my subsequences) because there is the place i want to modify the report file.



The thing with the ReportOptions, is it allows the user to setup the Report Options. Therefore, although there are properties such as ReportFilePath, they only become effective when other properties have been set with the correct value, usually a boolean. You can see this by setting the various controls in the Report Options Dialog and seeing what is enabled and disabled. There are other properties that allow you to setup the component parts of the filename, such as ReportBaseName.

The actual report pathname is not setup until a step in the process model entry sequence (Test UUTs or Single Pass) is performed. This sequence is called 'Determine Report Pathname' (this might not be the precise wording) and is then stored in a Local variable. 

You could obtain this setting in your MainSequence by using the lookup string "RunState.Caller.Locals.ReportFilePath".

Hope this helps

Regards

Ray Farmer

Message Edited by Ray Farmer on 11-23-2006 07:41 AM

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

Hello Ray,

I think, the lookup string in the last sentence of your post should be "RunState.Root.Locals.ReportFilePath"

Am I right?

S. Eren BALCI
IMESTEK
0 Kudos
Message 5 of 6
(3,265 Views)

Hi,

They are one of the same. The RunState.Root always being the first sequence run, so it does matter at what level you get the Locals.ReportFilePath value from, where as RunState.Caller being as the name suggest therefore you can only use RunState.Caller.Locals.ReportFilePath in the MainSequence called from the ProcessModel Entry Sequence.

Hope this hopes

Regards

Ray Farmer

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