NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Initialize StationGlobals In TestStand

I've more than 100 variables in StationGlobals.ini file. In setup group I've to initialize each of these variables. I understand that there are two approaches to initialize these variables:

 

Approach 1:

Set default values in each variables in stationglobals and then export all the variables to a file. In setup I can use "property loader" to load the defaults. However, the system I'm working on doesn't have MS Office package. Hence the text file that I have created is not easily readable in notepad & hence difficult to use.

 

Approach 2:

In setup group I can use "statement expression" step and initialize each variables. However, this is much time consuming as variables are more.

 

Is there any other approach you guys have to deal with this situation? I think many of you may be facing this problem. Can you guys share how you deal with this problem?

 

Regards

Amit

0 Kudos
Message 1 of 6
(4,402 Views)

Put all the Station Globals into a container and use ReadEx and Write to get and set the variables from a PropertyObject file.

CTA, CLA, MTFBWY
Message 2 of 6
(4,396 Views)

Another option is to do what Snowpunter said, but make it a custom type container that contains all of your variables in their default state. Then in your setup, delete the container (if it exists) and then recreate it.

 

-Jack

0 Kudos
Message 3 of 6
(4,393 Views)

I wrote a  tool to update the StationGlobals from an INI file.  The idea is that you can update the StationGlobals from the Tools menu once after installing the Operator Interface.  The tool is written using LabVIEW called by a sequence file.

 

For items that do not change like hardware addresses, I would have the following:

 

[ACPS1]
GPIBAddress = String,GPIB0::1::INSTR
Type = String,Pacific Power - AC Power Supply - AMX112

 

The tool would create a container: ACPS1.GPIBAddress and ACPS1.Type with the type and values specified.

 

For items, that are different on a system by system basis, I prompt the user for the details.

 

[System]
StationName = ?String,Enter the Computer Name ( Example TE0061 ).
StationID = ?String,Enter the StationID ( Example: ATS 2 ).

 

It has worked well.

 

Thanks,

PH

0 Kudos
Message 4 of 6
(4,383 Views)

Sorry for late response..Was busy with testing the whole week Smiley Surprised

 

I tried to get some example on using ReadEx and WriteEx methods but couldn't. Is the any example that I can get from you guys?

0 Kudos
Message 5 of 6
(4,338 Views)
Search the forum, I posted one a few weeks ago.
CTA, CLA, MTFBWY
0 Kudos
Message 6 of 6
(4,332 Views)