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: 

How to get the Sequence Context of a Step in another sequence file

In LabVIEW Module, I can track down to the expected step which in another sequence file. When I get the object of the expected step, how can I convert or get the ThisContext object of that Step? Because I need the Sequence Context of that step to do some operation in LabVIEW.

 

Do the ThisContext just can be passed from TestStant into LabVIEW, Or also can get the ThisContext in LabVIEW, How?

 

Thank you for any advice!

0 Kudos
Message 1 of 10
(6,452 Views)

I'm not sure I understand completely what you are asking here.  If you just want to pass the sequence context to a VI just pass it as a parameter.  All of the templates for the LabVIEW steps have the sequence context going into them.  Just place down a LabVIEW step and click the create VI button.  It gives you a VI with the sequence context going into it.

 

FYI the sequence context is only available during execution. 

 

Open the TestStand help.  In the Index tab type "Sequence context".  You can read more about what it is and how to use it.

 

Also another great reference is Chapter 3 of the TestStand reference manual.  It contains a whole section about the sequence context called Using the Sequence Context.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 10
(6,436 Views)

jigg,

Thank you for your reply, and the detailed clue.


But my scenario is this: I try to create a TestStand Tool Sequence file(Show a item in the Tool Menu) to modify existing sequence file automatiocally. The tool sequence just call a LabVIEW VI, which will use the ThisContext as the input parameter from the tool sequence. This VI will call some subVIs which will do some operation to specific steps in the existing sequence file. the subVIs aslo use the Sequence Context as the input parameter, but it should be the Thiscontext of the specified steps, not the excuting tool sequence. So I want to how to get the Sequence Context from a step object reference.

 

DO you think this is possible?

 

Justin

0 Kudos
Message 3 of 10
(6,426 Views)

Justin,

 

It is not possible to use the sequence context like that.  Because the step you are trying to manipulate is not executing currently there is not a sequence context for it. 

 

I have written similar tools in the past.  You will want to manipulate the disk copy of the step using the TestStand API.

 

If you explain what you are trying to do to the step I can give you some advice on which API calls to use.

 

Essentially you are doing it correctly by passing ThisContext to your Tool's VI.  Inside of there however, you will want to get the engine of that context and use that to open and save sequence files and to iterate through sequence files to manipulate subproperties of that sequence file (such as steps or variables).  All of this would be done, again, using the TestStand API and NOT the sequence context.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 10
(6,413 Views)

Jigg,

 

Thank you very much!

 

You are right, the Sequence Context can not be available for not executing sequence. I try this just because I want to reuse some subVIs which have Sequence Context as input parameter.

 

As you suggestion, I guess I just can depend on the TestStand API directly. Thank you again.

 

Justin

0 Kudos
Message 5 of 10
(6,408 Views)

Hi,

 

If you want to use the TestStand api to programmatically edit an open sequence from a sequence launched from the Tools menu, use InitialSelection property of the SequenceContext you have within your tool. In a VI in a tool sequence you will use SequenceContext.Runstate.InitialSelection.xxx. You can use TestStand Help, Index tab, search on sequence context to find out more about InitialSelection.

 

And there is no TestStand Reference Manual anymore 😞

 

cc

Message 6 of 10
(6,401 Views)

As of TestStand 2012, all the content of the NI TestStand Reference Manual appears in the NI TestStand Help, which is also posted on ni.com

 

You can access the NI TestStand Help in the following ways:
• Select Help»NI TestStand Help in the sequence editor.
(Windows 7 or earlier) Select Start»All Programs»National Instruments»TestStand»Documentation»NI TestStand Help.

0 Kudos
Message 7 of 10
(6,388 Views)

Hi,

 

The TestStand Reference manual .pdf has a section in Chapter 3 called  "Step Execution" and it contains a table called, 

"Table 3-3. Order of Actions a Step Performs." I have spent 20 minutes searching the NI TestStand Help looking for this table and I can't find it. Maybe you can help me out and tell me what page it is now on?

 

cc

0 Kudos
Message 8 of 10
(6,383 Views)

see attached

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 9 of 10
(6,379 Views)

Wow,

 

Under Results Collection. I didn't have time to look at every page, and I didn't believe everthing was there. My faith is restored. Thank you.

cc

0 Kudos
Message 10 of 10
(6,374 Views)