04-08-2015 02:18 AM - edited 04-08-2015 02:43 AM
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
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
Here is my current implementation :
David Koch
Solved! Go to Solution.
04-08-2015 03:10 AM
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
04-08-2015 03:44 AM - edited 04-08-2015 03:52 AM
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
04-08-2015 03:57 AM
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
04-08-2015 04:59 AM
Initialisation currently looks like this, I hide some buttons and views :
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
04-08-2015 05:49 AM - edited 04-08-2015 05:51 AM
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?
04-08-2015 06:48 AM
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
04-09-2015 03:40 AM
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
04-09-2015 06:48 AM - edited 04-09-2015 07:10 AM
Hello,
I tried to work from this example :
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
04-28-2015 10:56 AM
Hello,
I tried my approach, but obviously I missed something.
Could someone check my code ?
David Koch