10-07-2009 05:08 PM
Hi all,
in my custom LabVIEW OI, after the user has decided to execute the sequence in the "Test UUTs" mode, i would like to:
- (if radiobutton1 is selected) display a custom front panel in which user can specify the UUT serial number
or
- (if radiobutton2 is selected) initialize the UUT serial number to a predefined value and increment every sequence execution.
Wandering through the forum, i succeded discovering that, to realize what i would like, i need to interact with the PreUUT callback.
Could someone help me realizing this?
Tnks
10-07-2009 06:08 PM
This document discusses callbacks in detail: http://zone.ni.com/devzone/cda/tut/p/id/6605
Basically you need to add the Pre UUT Callback to your sequence file. To do this:
go to Edit>>Sequence File Callbacks.
Click on PreUUT.
Click Add
Click OK
You should now see a green sequence in your sequence file. Click on it and add whatever you want in there. Now when your process model goes to call the PreUUT Callback it will call the one in your sequence file instead of the one in the process model.
Hope that helps,
10-08-2009 01:48 AM
Hi jiggawax!
Your method is surely the right one. The fact is that i would not like both to edit the sequence that will be executed and to modify any teststand settings.
I would like to succeed doing this programmatically and only via LabVIEW, using TestStand API.
Hehe, i'll wait for clues... ![]()
10-08-2009 09:32 AM
Hey aRCo,
Let me see if I am understanding you correctly. You have succeeded in using the PreUUT in your sequence. Now you want to post information from the OI to your sequence in order to get the behavior you want.
If you don't know about UIMessages then you are in for a treat. UIMessages are used for OI<->Sequence File communication. The gist of it is that you can post information to the OI from your sequence. However there is a trick to post information from the OI to the Sequence File. This is done by posting the sequence context and updating it via subproperties.
Here is a document on UIMessages: http://zone.ni.com/devzone/cda/tut/p/id/4532
Also, if you have taken the TestStand training you will find a nice example in the TS 2 manual. It goes step by step on how to handle UIMessages.
Hope this points you in the right direction.
Regards,
10-08-2009 09:40 AM
Jigg,
I think aRCo didn't want to change any sequences to achieve the requirement!!
I read it that the action was to be done in the Custom IO. I probably read this wrong.
![]()
Regards
Ray
10-08-2009 10:02 AM
Thanks both jiggavax and Ray.
Mine is a sample sequence with only one "Numeric Limit Test" placed in the Main group (both Setup and Clearup groups are void). Things in TestStand must remain simple. Ray is right: i don't want nor to edit the sequence neither to modify any other TestStand settings.
What i want to do is to intercept (maybe override is a better term) PreUUT callback and i want to do this in LabVIEW, obtaining the behaviour specified before.
10-08-2009 12:31 PM
Ok I guess I'm confused then. Let's define some terms here:
Client Sequence File is the file with the simple numeric test in it (no setup or cleanup stuff like you said)
Process Model is the pretty straight forward- the sequence file that has an entry point with steps in which the MainSequence from you client sequence file gets called.
PreUUT Callback is a sequence in the Process Model that gets called from the entry point at a certain time. Just like your MainSequence. So do you or don't you include this in the client sequence file?
OI (or UI, user interface, as defined by NI) is the operator interface which is an application written to execute a client sequence file on a deployable machine. Basically on your OI you have 2 radio buttons in which the user can click on before they start the execution.
Basically, you have information (the radio buttons) that you want to read in your PreUUT callback? If so then the best and proper/recommended way to do this is to use Custom UIMessages.
What I think Ray and you are saying is that you want to detect when your execution enters the PreUUT callback from the OI and update some values in the PreUUT callback? Is this correct? How would you get the information back to your execution? How would you know in the OI that it was at that point?
Can you please clarify so that I can help you find a better solution?
Thanks,
10-08-2009 01:42 PM
Hi,
this thread seems to be an interresting challange.
I have not done such a task before. But i think all you need
is to override the UUT callback as jigg said or change it in you model.
There you can call your LV front panel if it is desired or inc the serial number
depending on "radio-button status" variables.
What a about der radio buttons from OI?
I would place a listener to StartExecution UImessage in OI.
With it you can get a handle to the current thread and then to current context.
now you should be able so set the "button-status" variables in you SequenceFile
hope this helps (and works)
juergen
10-08-2009 02:18 PM
Hi,
I think Juergen you are correct, the simplest why would have been to override the PreUUT sequence with maybe using a UIMessage to get the state of the Radio Buttons in the UI.
Unfortunately, you can not modify the client sequence file and you are have to use the default process model.
Therefore I was thinking how can I set the IdentifyUUT Step in the PreUUT to Skip so that it's not performed the and set the UUT serial number and also set the ContinueTesting true.
What Event can I use to do such action? Possible the Start Execution Event is the only one that would be suitable.
Regards
Ray
10-08-2009 02:57 PM
Hi,
i have written a small OI to test my upper stuff
you can scrup it ! It is not working on UI StartExecution, because
you are jumping into the model seq. This was clear but i found no way to locate
a handle to file globals of my test SequnceFile
But you can use instead of file globals the station globals to do interchangement
between execution and IO.
Juergen