NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Logging local variables to a database

Solved!
Go to solution

Hi!

 

I have followed the instructions in "Logging a New UUT Property to a Database in TestStand" in order to be able to log my local variable under Database Options/Columns/Parameters/Expression. My problem is that I can't access my variable in the Expression field. I can access my global variables, but I would like to log local variables as well. What am I doing wrong?

 

Thanks, Nina 

0 Kudos
Message 1 of 2
(3,477 Views)
Solution
Accepted by topic author sunds

Nina,

 

local variables are only valid in their "area of validity". If the local variable is part of your MainSequence, this area of validity is left as soon as you leave the MainSequence and return to the ProcessModel. So it is no surprise that you cannot access that variable. You can either pass the value of the variable to the databaselogging (which might require some changes within the ProcessModel) or you switch it to be file global.

The third option, which is propably the best, is to pass the variable from the step (where the value is written to the variable) to the ResultList using AdditionalResults (TS 4.1 and above) or Step.ReportText....

 

hope this helps,

Norbert 

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