LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to globals without explicit wiring

Hi,

Apologies if the topic title is vague, I didn't know how to phrase myself.

In a current software project I'm working on, I have a VI that loads configuration data from a config file and writes them into several globals.

The surefire way is to manually make the connections to the "Read Key" VI, explicitly stating the section and key, then manually wiring the output to the relevant global.

However, as I have nearly 100 config data, this would seem excessively tedious.

I'm stumped on this one. Anyone have any ideas?

Thanks in advance.

cheers
0 Kudos
Message 1 of 2
(2,274 Views)

The easiest way to do what you want is to open a reference to the globals VI and then get\set all the control values:

But this is a hack and I would advise against that unless your data is really static. The better way would be to move away from globals, as they are usually a recipe for race conditions and bugs. There are other alternatives. Using an action engine with the OpenG variant config VIs might help you.


___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,268 Views)