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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Windows cmd subvi from a main vi

Hello everyone !

 

I was wondering if someone could suggest a suitable method to pass data in and out of a subvi, which runs a while loop sending Window command prompt commands.

I found a vi which works for controlling cmd (attached), but using it as a subvi within my main program is where I get stuck. I need to send several cmd commands in a row, but the subvi gets stuck in the while loop. The data I am trying to pass from the main vi into the subvi is the cmd commands and data I am trying to receive from the subvi is cmd output.

 

Thank you for any suggestion !

Best, Milff

0 Kudos
Message 1 of 2
(467 Views)

Instead of string control and indicator, you can pass queue refnum to the subVI, which allows the subVI to run asynchronously and allows you to send and receive string data from caller VI.

0 Kudos
Message 2 of 2
(424 Views)