08-29-2016 03:11 AM
Hello,
Solved! Go to Solution.
08-29-2016 04:48 AM
Post your code instead of image, So that it will be easy to debug and test and modify.
08-29-2016 06:41 AM
I believe the error is happening because accessing a local requires that the API know what Sequence to be using (MainSequence, etc.) I believe changing the Local to a FileGlobal will fix the problem as the FileGlobal should be accessible after opening the sequence file.
08-29-2016 06:52 AM
I have tried putting FileGlobals , still same error.
08-29-2016 06:54 AM
Local variable itself should work!
its always better to share code than sharing picture.to understand better.
08-29-2016 07:17 AM - edited 08-29-2016 07:24 AM
I am sharing the base code I have used to build my project .It contains the LV project and TS seq. file. Extract it in the same folder. Inside the project expand TS Full LabVIEW UI.lvlib and open Top-Level VI.vi.
After running the code just press the Value Update button from front pannel . It should load the seq. file and should update the variable data where I am getting error.
Please note Labview version is 2015 and Teststand version is 2014.
08-29-2016 08:08 AM
One problem with your code is that SetValString requires the "SequenceContext.AsPropertyObject". Your code passes the SequenceFile reference. One solution would be to use StationGlobals. Those can be accessed via Engine.Globals.
Alternatively, you can get the SequenceContext, but this requires a running execution. Your pictured code only opens the sequence and the user hasn't clicked on "TestUUTs". Assuming that an execution has started (via TestUUTs or whatever strategy you like), you can call ApplicationMgr.Execution.Item(0).GetThread(0).GetSequenceContext(0).AsPropertyObject.SetValString
I wouldn't recommend doing things this way. It is much easier to have TestStand pass the SequenceContext to LabVIEW code via a UIMessage or just through any TestStand Step.
Also, in general, I wouldn't programming your UI to set values such as Serial Number. I would recommend having your TestStand Sequence or Model get the serial number. This prevents the problem of only being able to run your TestStand code on the specified UI.
08-30-2016 12:36 AM
My motive is to insert the serial number to the UUT serial number, i.e. I will scan a barcode in the LV UI . It has to pass the barcode serial number to the teststand. I wanted to insert the serial number in the PreUUT so that when the sequence starts running the UUT information popup box should not appear and it could take the UUT serial number as barcode data from LV. So to get this maybe we have to pass or update the varible which I will use for serial number in PreUUT sequence as soon as the seq. file is loaded in the LV interface. After that it will be runned.
08-30-2016 01:15 AM
You can Modify The DoPreUUT Sequence to Scan for Barcode, instead of POP UP asking for Serial Number. barcode scanning can be done using LabVIEW and the OutPut of LV can be Passed directly to Serial Number Local variable
08-30-2016 08:53 AM
I would definitely recommend changing the callback for PreUUT or DoPreUUT instead of doing things through the operator interface. It would be easy to add a message popup (using the TestStand popup or in any language) and having the user scan in the barcode and then your TestStand code saves it to a local variable. Then, you can do whatever you like with this information and create Parameters.UUT.SerialNumber.