05-14-2013 12:47 PM - edited 05-14-2013 12:49 PM
Hello All,
I have a GUI that runs teststand application and I want to be able to pass a scanned barcode string to the TestStand UUT information Dialog box Serial Number requirement without having to scan the barcode twice. I just want to be able to scan the barcode only once and that string parse to the Serial Number of Teststand UUT information dialog box and just click ok after I click run sequence button.
What is the best way to do this?
Any suggestion or example that points me to the right direction will be greatly appreciated.
Thanks.
Stan.
05-15-2013 10:14 AM
It doesn't look like it would be possible to pre-fill the standard UUT Information dialog box. If you look at the DoPreUUT sequence in SequentialModel.seq,it is calling a function in modelsupport2.dll and this doesn't accept a parameter to pass in the serial number.
If you want to skip the standard UUT Information dialog box then all you need to do is add an empty PreUUT callback to your sequence file.
I certainly don't know the best way to get your serial number from the operator interface to your sequence but based upon similar situations I've had, I would look at opening a reference to the sequence file from your OI and setting the value of a FileGlobal before running the sequence. Your PreUUT callback can then take the serial number from the FileGlobal and pass it to Parameters.UUT.SerialNumber so it will be in the right place to get picked up and appear on your test report.
05-15-2013 11:12 AM
Thanks Adam for the reply.
I think if I am able to set a fileglobal variable which will be the input string from the interface, I should be able to pass that string to my UUT Information dialog box. The problem, however is that this fileglobal variable is not working when I used the TestStand set property vi. It gives an error message that says "Null Refnum passed to Close reference".
Another thing I was able to is create a vi that creates or set the fileglobal variable and add that to my preUUT callback. This works but it requires me to have a default string value which is not good because my value is going to continually change.
Attached is the code I used to create the fileglobal value. I will appreciate it if you see anything wrong with my code.
05-16-2013 03:24 AM
I had a quick look at the VI. I believe that for the SetValString your lookup string should be "BarcodeNumber" rather than "FileGlobals.BarcodeNumber".
I'm not sure why you would want to create/set the file global in the PreUUT callback. That is where I would expect to read the file global already set by the operator interface and pass it to Parameters.UUT.SerialNumber.
Do you need to pass the serial number already captured in your operator interface or are you just trying to remove the standard UUT Information dialog, in which case you could just call a VI in PreUUT callback to prompt the operator to scan the serial number and then pass the value returned from the VI to Parameters.UUT.SerialNumber.
05-16-2013 07:26 AM
Adam,
Good observation on the lookup string value.
My GUI already has a request for Serial Number and I want to pass this value to the UUT information dialog box when I start the Operator interface without having to scan the barcode again. Basically, my Top-Level vi has a control that pulls the serial number for other purpose even before the Operator interface is executed.
The problem I am having is that when I create a subvi that use the teststand property lookup string, a sequence context is need for the property of teststand set property value which I am having trouble creating in the Operator interface.
When I create a sequence context from the teststand set property, an error occurs saying "a num or previously deleted refnum was passed as an input value".
In summary, this is what I want to achieve:
1. Top-Level vi -----serial Number created
2. Operation Interface --- Serial Number from Top-Level vi passed to UUT information dialog
3. Serial Number passed to FileGlobals or StationGlobals so that it can be included in the test report.
I hope my explanation was clear enough.
Thanks for your time Adam.
Much appreciated.
Stan
05-28-2013 09:40 AM
Adam,
I was able to get it to work.
12-10-2013 04:37 AM
Hi Angel,
I am having a similar requirement can you share your idea here ?
Thanks
Kansal,.
05-08-2014 06:05 PM
can you share how you did it?
Thank you