LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute VI After Loading File From Path

Solved!
Go to solution

Referring to picture in attachment.

Part of my main VI is used to select an instrument config file then use info in the file to program multiple power supplies at multiple GPIB addresses with various voltage settings.

The config file contains power supply names and voltage settings, it does not contain GPIB address info which varies from test setup to test setup.

I'd like to be able to select the config file then press a button which executes part of the VI which scans the file and extracts power supply names, voltage settings, etc.  It then would also populate the string array called "Supply Name 2" in picture.  Then I can select the appropriate VISA resource (GPIB address) for each line in Supply Name column.  Afterwards, I would like to run the Mian VI (the reset of the code) in same front panel which will program the actual power supply instruments.  So how do I execute a section of my VI code using a button called "Load Config File" and retain the info from the config file to be used with rest of VI code upon clicking the normal "Run VI" button?

 

0 Kudos
Message 1 of 3
(1,019 Views)
Solution
Accepted by topic author Todd_Cooper

Hi Todd,

 


@Todd_Cooper wrote:

So how do I execute a section of my VI code using a button called "Load Config File" and retain the info from the config file to be used with rest of VI code upon clicking the normal "Run VI" button?


You cannot execute code before starting the VI using the run button!

 

Instead your VI need to run as long as needed...

 

(Do you need to run Word twice to be able to edit a document?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(1,011 Views)

Ok thank you for your input.

Todd

0 Kudos
Message 3 of 3
(991 Views)