NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Which veriable in TS store the Execute mode (Test UUTs, Single Pass etc..)

I'm writing a program in CVI7.0 with TS3.0. I would like to inquire the TS to the Execute mode.--was the user selected Test UUTs (F5), or Single Pass (Ctr F5), or 'Run Main Sequence' or 'Run Selected Steps'.

Can you advise how to do that?

Thanks
0 Kudos
Message 1 of 11
(4,328 Views)
Hello,

To determine which Execution Entry Point is being used to call your client, you can use the TestStand 3.0 API to call properties an methods that will return to you the name of the root sequence. I have attached a sequence file that makes ActiveX calls to the API to do just that and displays the result in a Message Popup step. If follows these steps:

1. Get the root context (this will be the context of the sequence of the process model that is used to execute, ie: Test UUT, or Single Pass).

2. Get the sequence from the root context.

3. Get the name of the sequence.

4. Display the name (if it is a Test UUT, I have preconditions set up to only display it on the first UUT tested).

If you chose, "Run Main Sequence", the name that you rec
eive will be "MainSequence" because the root sequence is not a Process Model sequence, but the MainSequence of the client file.

I hope that this is helpful. Take care and have a great day!

Aaron B.
National Instruments
Message 2 of 11
(4,328 Views)
You can also use Execution.InInteractiveMode to determine whether you are running an interactive execution, but you cannot determine whether it is a root or nested interactive execution.

Scott Richardson (NI)
Scott Richardson
https://testeract.com
0 Kudos
Message 3 of 11
(4,328 Views)
Hi,

Item 4. If you had selected Run from the menu, then the name returned will be which is currently being viewed, which maybe MainSequence if that was selected.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 4 of 11
(4,328 Views)
Thank you very much
Your example work perfectly and I will be using it.

Is it possible to achieve the same information from CVI?

Thanks
Rafi
0 Kudos
Message 5 of 11
(4,328 Views)
Aron,

Can you achieve the same info from within Labwindows/CVI?

Thanks
Rafi
0 Kudos
Message 6 of 11
(4,328 Views)
Hello Rafi,

Yes you can. CVI provides an instrument driver that allows you to access TestStand API properties and methods. If you are using a CVI code module, I would pass it ThisContext. From there, you can get references to each of the items that I listed in the steps of an earlier posting of mine.

For specific information about the TestStand API structure, I find the TestStand Help extremely useful. I would navigate to, "TestStand API Reference Help >> TestStnad ActiveX API Overview >> TestStand API Concepts >> Object Relationships >> Using TestStand API Objects". There is a diagram showing all of the objects in the API. Lines with arrows indicate that there is either a property or a method that you can use to get a reference from the
first object to the second. I would highly recommend that anyone using TestStand bookmark this help page for future use. Hope this helps. Take care!

Aaron B.
National Instruments
0 Kudos
Message 7 of 11
(4,328 Views)
hi Aaron.B
i find your answer to Rafi2003 usable for me.
i tried to use it on TS2 and it didnt open.
can you send me this example (getexecutioninfo.seq)
for TS2?

thanks
in advance
simon.i
0 Kudos
Message 8 of 11
(4,328 Views)
Hello Simon,

I have re-written the example sequence file in TestStand 2.0. Hope you find this helpful. Take care!

Regards,

Aaron B.
National Instruments
0 Kudos
Message 9 of 11
(4,328 Views)
Thanks Aaron, the example is very good and useful.

With your permition, is it possible to broaden
the response? meaning: when running "single pass" (Ctrl+F5) or "Run selected step using single pass"
in both cases the result is "Single Pass"

is it possible to distinguish between both cases?

(i define two major modes "Full test" (F5, Ctrl+F5) and "Partail test", (Run selceted steps...) , and i wish to distinguish between both..)

thanks again
Simon.I
0 Kudos
Message 10 of 11
(4,328 Views)