04-08-2013 04:54 AM - edited 04-08-2013 04:56 AM
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!
04-08-2013 02:28 PM
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,
04-08-2013 10:58 PM
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
04-09-2013 08:23 AM
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,
04-09-2013 10:26 AM
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
04-09-2013 07:34 PM
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
04-10-2013 10:08 AM
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.
04-10-2013 11:17 AM
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
04-10-2013 11:39 AM
see attached
04-10-2013 12:05 PM
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