04-27-2012 06:16 AM
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
04-27-2012 10:12 AM
Put all the Station Globals into a container and use ReadEx and Write to get and set the variables from a PropertyObject file.
04-27-2012 12:18 PM
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
04-27-2012 04:12 PM
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
05-06-2012 01:31 AM
Sorry for late response..Was busy with testing the whole week
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?
05-06-2012 11:14 AM