NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

[LV -> TS] How to execute a SEQ file, get the result (PASS/FAIL) and the report file ?

Solved!
Go to solution

Hello,

 

I'm looking for the most obvious and simple way to, from Labview :

 

1- Start the Teststand engine : DONE

2- Get a list of SEQ files to execute : DONE

3- Loop through the list to execute each SEQ file : <- found some examples but I have some trouble with the UIMessage stuff

 

http://zone.ni.com/reference/en-XX/help/370052N-01/tsexamples/infotopics/executing_sequences_using_a...

 

4- Get the result of the SEQ execution : <- unsure

5- Get the XML path+name of the report file generated : <- obviously not easy

 

http://digital.ni.com/public.nsf/allkb/3D3B2358DF9B786B8625789500549A3B

http://forums.ni.com/t5/NI-TestStand/Getting-Report-File-Path-location-at-execution-in-TestStand-201...

 

Here is my current implementation :

 

Clipboard_150408_091852.png

 

David Koch

 

 

0 Kudos
Message 1 of 28
(6,508 Views)

I think there are several issues with your code:

A) You are using a process model for sequence execution? If not, you have an issue because the process model generates the report.... this point is not clear from your screenshot.

B) Never use "WaitForEndEx" in UIs! Instead, use an application manager and configure a callback for the "EndExecution" event. Configure it to pick the correct execution (remember: there is a frontend callback and possibly more!).

C) Maybe you want to create a custom process model instead of such a custom UI you are currently working on. In your process model, you can read a list of client files from the UI (UIMsg) and the loop through the MainSequence call (compare "TestUUTs") while switching client files for each iteration. This is possible, but possibly not the nicest way to solve it.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 28
(6,500 Views)

Hi Norbert_B, thanks for your input.

 

My constraints are as follow :

 

1- no Sequence File View

2- no Report View

3- no TS Run sequence button

 

What the application have to do, on behalf of the operator :

 

A- scan a product code

B- from a database, fetch the list de sequence files to execute

C- also get the last generated result code

D- execute the sequence list

E- display a green/red button on the front panel according to result

F- store the sequence files' result in the database (link to XML files)

G- print a label to stick on the product (if test successful)

 

Basically that's just it, nothing from TS should appear.

 

Everything have to be controlled from Labview.

 

Is there a way to feed Teststand with a list of sequence files

to execute and fetch an array of result + report at the end ?

 

David Koch

0 Kudos
Message 3 of 28
(6,494 Views)

David,

 

even though your UI doesn't use "visible controls", you should use the manager controls. Depending on the UI Msgs you want to capture you create maybe all three managers....

Sounds like a simplified custom process model makes sense, but its up to you going down that development road...

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 28
(6,489 Views)

Initialisation currently looks like this, I hide some buttons and views :

 

Clipboard_150408_115743.png

 

Still, there's a lot of database management to do, with many linked tables,

so I bet my salute is through the Labview way, doing it using Teststand

might be a bit tricky. Nonetheless there's the operator interface to control

too.

 

You know, the "that development road" do not depend on me but what I'm

asked for. It would be me...

 

David Koch

0 Kudos
Message 5 of 28
(6,487 Views)

David,

 

it seems that you are using a QMH architecture. So you can use the AppMgr to open the sequence file, use the Engine to start the execution (using a proper process model) and the use a callback VI attached to the EndExecution UIMsg which enqueues the closing of the SequenceFile (AppMgr.CloseSequenceFile()) and starting the next list entry using the QMH. So you would pass the queue refnum as user parameter to this callback VI.

 

Remember to identify the execution first, otherwise you will trigger this for login/logout and other stuff as well!

 

Norbert

 

PS: Manager Controls are by default invisible during runtime, so the property node "visible" doesn't make sense.

EDIT: You are aware that you could also use a "DoClick" method on the sequence execution button in your QMH to start the execution?

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 28
(6,482 Views)

Hi again 🙂

 

Well, I tried to import some code from existing examples, but the best

would have been to find a VI that just accept a SEQ file as input and

produce a boolean (PASS/FAIL) and a string (path to report).

 

Obviously there is no simple way to do things, despite trying the naive

one. Or maybe I not googled deep enough 😛

 

Have you an example to point me ? Because playing with callbacks

and events is a bit subtle to me, already having to manage the main

front panel's widgets. Interfacing the TS engine (WaitForEndEx and

stuff) in my main loop already make things rather touchy.

 

David Koch

0 Kudos
Message 7 of 28
(6,473 Views)

David,

 

hehe, that's the reason why you should try to avoid accessing the Engine directly as far as possible. Using the manager controls is a key for this but you are correct that this requires some experience, hence time to collect that experience. Nevertheless, i am confident that using that approach, you will get a more robust solution in the end.

 

What is it you are currently "hanging" with? Can you post the code to it?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 28
(6,441 Views)

Hello,

 

I tried to work from this example :

 

http://forums.ni.com/t5/NI-TestStand/Execution-of-TestStand-Sequence-in-LabVIEW-via-TS-API-Different...

 

However it remains unclear about how to get a simple

answer from just running a sequence file out of any

model so far (Simple Pass). Like I told you, all what

I need, once the TS engine is started, is a VI with the

following interface :

 

INPUT

1- TS engine reference

2- SEQ file path (path or string)

3- Sequence name to execute

4- UUT string (optional, but yeah)

5- error in

 

OUTPUT

1- Result boolean (PASS/FAIL)

2- Path to XML report

3- error out

 

It would be so cool to just have this 🙂

 

About the surrounding UI, I'm working on it. The LV

code is not really important at this point, it's running

a SEQ file that matters to me.

 

David Koch

 

 

 

0 Kudos
Message 9 of 28
(6,438 Views)

Hello,

 

I tried my approach, but obviously I missed something.

 

Could someone check my code ?

 

David Koch

0 Kudos
Message 10 of 28
(6,315 Views)