From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

stationglobals

Dennis.  When I first ran the sequence and VI you sent, things worked fine.  Then I modified my StationGlobals file, and your VI to match, but all I get is err 97, and the WorkCenter value no longer gets displayed.  In fact, I've tried to just read the StationGlobals.TS.LastUserName and it won't even let me do that.  Any idea what I'm doing wrong?

 

0 Kudos
Message 11 of 21
(1,930 Views)

Hi,

If I remember Dennis's example used the Lookup string of StationGlobals.WorkCenter but now the lookup string is

StationGlobals.ATEReg.WorkCenter (as detailed in the StationGlobals.ini)

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 12 of 21
(1,917 Views)
I'm able to get the example to work, which reads the stationglobals and updates an indicator.  In my example, however, I have a control that I want to populate with the appropriate value read from stationglobals.ini.  Then, since this is a dialog, I allow the user to enter in a new value into the control (and others on the dialog), until they click 'submit' - at this point, I want to write the value of the control back to the stationglobals.ini file.  I'm using the same sequence context to feed both the TestStand Get/Set Property Value.  I use a similar approach as in the example (from Dennis), but neither the control nor the stationglobals is ever updated.
0 Kudos
Message 13 of 21
(1,892 Views)

Hi,

I am assuming the lookup string you are using for the Get and the Set are the same, then the Station Globals should be changing. Can you setup a watch on one of the properties you are changing?

Want are you looking at too see if the values are being changed.

Dont forget, that the actual StationGlobals.ini file will not change until either your Shutdown Teststand or you do a Commit to File.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 14 of 21
(1,890 Views)

I'm not sure how to perform a Commit To File in LabVIEW.  What I have tried, however, is using the Sequence Context to get an engine reference.  Then I've looked at ConfigFile::WriteFile, Globals::Write, and GlobalsFile::WriteFile (and SaveFileIfModified).  I'm not sure, though, how to associate these methods with the StationGlobals.ini. 

Also, am I on the right track in my approach to updating the string control?  I simply created a Property Node ::Text::Text and I've tried Property Node::Value - I change the property node to a write and connect the output of the TestStand Get Property Value call to it.  The lookup string is the same one that worked in the example (provided by Dennis).

0 Kudos
Message 15 of 21
(1,888 Views)

Hi,

I have modified Dennis's sequencefile and VI.

It now reads and writes to a StationGlobal.

Regards

Ray Farmer

Regards
Ray Farmer
Download All
0 Kudos
Message 16 of 21
(1,881 Views)
I finally was able to run your test sequence and r/w VI.  First, it does update the stationglobals.ini, but not until I completely exit TestStand.  Second, in my situation, I have a control instead of an indicator - I created a property node for it.  I read the .ini and try to update the text.text property based on the value read.  This doesn't work in my/your example.  Can controls be updated in this fashion?  Also, how can I force the .ini file to write?
0 Kudos
Message 17 of 21
(1,872 Views)

Hi,

This VI now forces the StationGlobals to save after the change.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 18 of 21
(1,859 Views)
I was detoured in my station globals effort for a while.  I came back to it this morning and created a subVI just for fun, but even before that, my code does not work as desired.  I would LIKE to have the stationglobals.ini file read when this VI is called.  I'd like the WorkCenter and StationPartNumber to be read from the .ini and for those values to appear in the dialog in the appropriate spot.  Then, when the while loop is entered, the user can modify any of the fields as desired.  When complete, all new values (ultimately, but right now just the two mentioned above) should be written to the .ini file.  I've attached the code in hopes that someone can see what I'm doing wrong - (1) why won't my code populate the dialog box with the two values read from the .ini, (2) why won't the new values get written to the .ini?
0 Kudos
Message 19 of 21
(1,796 Views)
Hi,
 
You need to put the SequenceContext Control on the top level VI's connector pane so that TestStand can pass thisContext to it.
 
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 20 of 21
(1,792 Views)