05-11-2006 02:33 PM
05-11-2006 03:18 PM
You should not modify the StationGlobals.ini with e.g. a text editor.
The recommended methods of reading, writing and creating properties are available in the TestStand API. Look e.g. at the NI example code "Modify Sequence Files". (This example code requires some modification to match your need. But it demonstrates the usage of the API.)
BR, Guenter
05-11-2006 04:04 PM
05-12-2006 01:51 PM
I'm not having very good luck here. I added a Global to my StationGlobals using TestStand. It's a string entitled WorkCenter. Within LabVIEW (ver 8). I dropped down a Get Property Value VI from the TestStand Pallete. What I want to do is read the WorkCenter value from the StationGlobals.ini and populate my WorkCenter string control. What I'm having trouble with is setting the proper parameters for Get Property Value (GPV for short). I created a Property Node for the WorkCenter string control (with Text.Text selected) and changed it to a write and connected the Value output of GPV to it. What I just can't figure out is how to set the GPV's Sequence Context In and Lookup String. For the Lookup String I right-clicked and created a constant and entered "StationGlobals.WorkCenter" as a guess. For the Sequence Context In, I tried Create::Property::StationGlobals. This creates a SequenceContext, but I don't know what to do with it. StationGlobals property. I've attached the VI for reference.
05-12-2006 03:05 PM
I think you are making this much harder than it should be. I can't open your Vi because I don't have 8.0 so I've included a sequence and VI that I wrote. If you set a breakpoint and step into the VI and then run it, the indicator on the front panel will show the contents of the station global. It took me about 5 minutes to write the whole thing.
You might want to read the chapter on using LabVIEW with TestStand again. Your sequence context control should be wired to the VI's connector pane and when you specify the module in TestStand, the sequence context should be pointed to TestStand's "ThisContext". If you use TestStand to create your VIs, a lot of the work will be done for you. I hope you're not trying to run the VI outside of TestStand. That wouldn't make any sense. Look at the shipping example I mentioned.
05-12-2006 04:16 PM
05-13-2006 11:22 AM
05-13-2006 12:10 PM
Engine.CommitGlobalsToDisk ( promptOnSaveConflicts = True)
05-15-2006 08:42 AM
Just wondering a couple of things. I found the Sequence Context in the TestStand::Legacy pallette. When I see 'Legacy' I think "soon to be deprecated". Am I supposed to get it from the Application Control (AC) palette instead. Also, when I get the one from the TestStand palette, it looks different than the one from AC palette - this one has a 'property' at the bottom that can be changed from 'Select Class'. Finally, why/when would I use the StationGlobals property vs just using the TestStand::Get Property Value VI and using its Lookup string input and specifying "StationGlobals.WorkCenter".
05-15-2006 09:11 AM
Hi,
While there is TestStand 2.0.x about, you will have the legacy. But the SequenceContext is still one of the inputs that you would want to pass to your code.
The different between the TestStand palette and the application control palette, the reference controls have been pre selected for TestStand, where as the AC palette are generic, so you would have to select class. You would still have to do this if its anything other than the SequenceContext as this is the only one supplied in the TestStand palette.
For the Get Property, One has the reference of the SequenceContext and therefore you would have to use the lookup string of "StationGlobal.<someproperty>". The only has the reference of the StationGlobals, therefore only the name of the property is required.
Basicaly this applies to any property, the lookup string you use will be based on want you are referenced to.
Hope this helps
Regards
Ray Farmer