NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

What does "context" mean?

I am trying to understand the concept of "Context".  I've searched for definitions of "Context" and "ThisContext" as they applies to TestStand and I can't find any.
 
I understand what "parameters" and "locals" are.  I know that under the "Context" tab in the sequence editor, I can expand the "ThisContext" tree, under which I find another "ThisContext" tree, under which I find another "ThisContext" tree  ... ad infinitum.  Within any of those many "ThisContext"s, I can pick a particular local to watch and its value is the same as the value of the corresponding local at the top level "ThisContext".  I am confused about what all that means.
0 Kudos
Message 1 of 5
(6,666 Views)

Howdy 2and4,

 

I was also in the same boat as you of not understanding what the sequence context was when I first started out with TestStand. 

 

sequence context is an object in the TestStand API that represents the execution state of a sequence.  TestStand maintains a sequence context that contains references to all objects, global variables, local variables, and step properties that relate to the execution of the active sequence. The contents of the sequence context change depending on the currently executing sequence and step. 

 

There are edit time and run-time copies of sequence contexts. You can view the edit time sequence context by selecting View >> Browse Sequence Context. This shows you all the objects, variables, step properties that exist at edit time.  During run-time additional objects are created, and thus the sequnce context will now have more information.  You can view the run-time sequence context by placing a breakpoint in the sequence, then switch to the Context tab when your code breaks at that step.  

 

Chapter 5 of the "Using TestStand" manual as well as Chapter 3 of the "TestStand Reference Manual" discuss these topics in more detail as well.  

 

Hope this clarifies.

 

Best Regards,

Jonathan N.
National Instruments
Message 2 of 5
(6,649 Views)

I'm also new to Labview and I'm currently learning from my colleague's code.

according to the Getting Started manual, page 10-6:

"Add additional controls to the front panel so that the LabView Standard Prototype Adapter can call the VI from TestStand..."

As I understand, I need to specify LabView Standard Prototype Adapter so that a VI can be called from TestStand and that Test Data and error out control is a must.

Is it necessary to add context sequence? Context Sequence will contain all data and property but is it required for the code to run?

maybe i should experiment(remove the context sequence) and see how it goes 🙂

0 Kudos
Message 3 of 5
(6,333 Views)

Hi,

You only need to add the Sequence Context control if you are going to make call to the TestStand API methods and properties.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 5
(6,331 Views)

rfbu,

TestStand can call any VI.  It doesn't matter if the connector pane has 2 elements, 15 elements, or no elements.  Using Error In and Error Out is certaintly recommended, but not required.

Keep in mind, that when you change the connector pane, you will have to reload the module in TestStand.

Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 5 of 5
(6,308 Views)