From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Variables-NI TestStand.

Solved!
Go to solution

Hi,

     What is difference between Local Variables,Station file global variables and Station global variables?.and how these variables can be used effectively in Teststand application.

0 Kudos
Message 1 of 4
(2,882 Views)
Solution
Accepted by topic author ANBARASAN

Local Variables - Only usable in the current sequence.  Most of your variables should be these.

File Globals - Only usable in the current sequence file.  Any sequence inside of the sequence file can use it.  Useful for tracking unit specific variables that many of your sequences will need such as IP Address, min/max voltages and currents, etc.

Station Globals - Any sequence on the current machine can use the variable.  I usually only use these for things my "common" sequences will need such as Report Folder (to put additional information with the report such as scope plots, retrieved files from the UUT, etc).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(2,867 Views)

The TestStandSystemand ArchitectureOverviewCard  has a good picture and description of each.  You can find it in the TestStand folder under Doc.  It is a PDF. C:\Program Files (x86)\National Instruments\TestStand 2017\Doc\Manuals (on my machine)

 

I'm also attaching it.

 

Also a link to it: http://www.ni.com/pdf/manuals/373457e.pdf

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 3 of 4
(2,854 Views)
Solution
Accepted by topic author ANBARASAN

Another word about FileGlobals:

Depending on your settings in the Sequence File Properties you'll have separate FileGlobals for each execution (default) or one shared FileGlobals for all executions (selectable) AT RUNTIME.

Changes to the variables in FileGlobals will disappear after your execution stops (Locals behave similar but there you are usually expecting it). If you want to modify variables at runtime and see the changes later in the editor at edit time you'll have to access RunState.SequenceFile.Data.FileGlobalDefaults. This is the blueprint for the FileGlobals you see in your executions at runtime (RunState.Execution.FileGlobals).

Also mind that the FileGlobals you are using in an execution won't be reset if you continue to use that execution (e.g. if you run "Next UUT" in the "UUT Information" dialog of the parallel model). To play around with that behaviour just create a sequence that displays a Message Popup that shows FileGlobals.MyInteger and incements that number after displaying.

 

As long as you are running only one execution (e.g. in sequential model) all this is of little interest to you but if you start with parallel executions you'll always have to know in which variable space you are operating otherwise life can become very confusing.

 

After you are comfortable with Locals, Parameters, FileGlobals and StationGlobals then you can dig in the documentation for Engine.TemporaryGlobals, Execution.RuntimeVariables and Thread.RuntimeVariables.

0 Kudos
Message 4 of 4
(2,831 Views)