09-23-2015 09:48 PM
Hi, today I was trying to use labview user interface to execute a program i wrote in Teststand, but I encountered an error: "Unknown variable or property name 'StationGlobals.TesterProperty". I couldn't figure out why because the sequence run fine in Teststand.
Since this step is run in the property loader step(I tried to load values into the station globals variables using the property loader step), I put a wait statement after the property load step and rerun it in Labview(thinking it might be a timing issue), the same still occured. I think there's something related to the global.ini file somehow not loaded from Labview interface... But that's just my theory. Can anyone please help? Thanks a lot.
09-24-2015 09:42 PM
Hey dudeman,
If you try running something along the lines of this community example, are you still unable to access the StationGlobal?
https://decibel.ni.com/content/docs/DOC-11447
You can always double check your StationGlobals.ini file by navigating to the following directory.
C:\ProgramData\National Instruments\TestStand 2014 (32-bit)\Cfg
I assume your error is thrown during run-time, does it interrupt the sequence process, or does it just throw an error on your LabVIEW UI?
09-24-2015 11:12 PM
No I wasn't doing anything similar to the example you showed in the attached file, I was using the Labview user interface simple to run a Teststand sequence, and when the TestStand sequence was trying to access a Teststand station global variable it wasn't recognised by Teststand(Throw a run time error -17306). Yes it's a run time error by Teststand(Not Labview), and yes it interrupted the sequence process and prompt me to go to clean up. (Please see the attached picture)
The strange thing is that when I run this very same sequence in Teststand it does not have any problem at all.
Could it be due to I'm running the Top-Level.vi in the vi library of the Labview user interface instead of running an vi executable and somehow Labview couldn't find the station global file? Thanks a lot.
09-25-2015 05:20 PM
It may be a race condition between TestStand and LabVIEW trying to both access your StationGlobal. One thing you can try is placing a Wait(ms) in the loop in the VI in LabVIEW. This will hopefully make it so both programs aren't trying to access the global at the same time. Give this a try and post back here.
09-28-2015 09:58 PM
Hi thank you for the quick reply, I have tried to put a wait statement in the while loop it still has not worked. The error would repeat exactly as if no changes has been made. I tried to put 50ms, 100ms and 1500ms in the while loop and it didn't work at all. I later on discovered when I run Teststand sequence in the Labview excutable file it would work, but if I run the sequence though the "Top-Level VI.vi" file in the Labview user interface simple Library folder, it would give me the same error. I don't understand why. Is there any way to fix it? Thanks a lot.
09-29-2015 02:42 PM
That's interesting because the TestStand Simple UI is just the executable version of the Top-Level.vi. Could you post your sequence file so that I can try and replicate the behavior you are seeing?
09-29-2015 03:54 PM
You need to create the stationglobal on that machine. I'm assuming you aren't running the simple UI on the same machine you were developing on? Is that correct? The StationGlobal file pointed out earlier is machine specific. If you didn't deploy it then there is no way for TestStand to just magically create the variable.
FYI- this has NOTHING to do with race conditions. It has everything to do with the property not existing.
You either need to deploy the StationGlobals.ini file or create it.
See here for how to dynamically create it:
https://decibel.ni.com/content/docs/DOC-25441
Hope this helps,
09-29-2015 04:15 PM
Thanks a lot for the advice, but I'm running the user interface on the same machine I had run the Teststand sequence. Everything is happening on the same machine I can gurrantie you. Do i need to put the global file in any specific folder so Labview can find it?
09-29-2015 04:30 PM
No you do not. It should be in the default location in the Cfg folder.
Can you post a screenshot of your stationglobals? In the Sequence Editor open them up by clicking on the World icon. I'm curious why you would be getting that error if it truly does exist.
Regards,
09-29-2015 04:39 PM
Yes please see the attached picture. Thanks.