LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data exchange between mein vi and sub vi during execution of sub vi (sub vi should get some data from main vi instantly)

Hello,

 

To control a test bench I have one main vi with all the controls, displays, and everything needed to control the test bench. 

I am aware of the advantages of sub vis (nr 1 advantage is the possibility to use the sub vi several times at different locations) but in this test bench program I abstained from subvis, because on my front panel I have some controls that have to apply instantly, e.g. a Stop-button.

I couldn't get around one subvi: I have to move some axles, so I created a sub vi called "move axle".

Now my problem is, if the user presses the stop-button on the main front pannel, the axle movement should stop instantly, but due to the sub vi, it does not stop until the sub vi is finished.

Another similar problem is, during the sub vi execution the front panel is frozen (all displays and charts stop).

 

How can I get around this problem? Is it possible to exchange some data between main vi and sub vi during sub vi execution?

 

LabVIEW 7.1 (I used to program with C and Labview 6)

Win XP

 

Johannes

Message Edited by johanneshoer on 02-27-2009 04:49 AM
Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 1 of 3
(3,435 Views)

Hi Johannes,

 

you should read about using references, queues, globals Smiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(3,412 Views)

Gerd,

 

thank you very much. I searched a little as well and I found this:

"Data transfering from sub-vi to main-vi "

http://forums.ni.com/ni/board/message?board.id=170&message.id=47364&query.id=3803#M47364

 which seems to be the solution.

 

Greetings

Johannes

Greetings Johannes
Using LabVIEW 7.1 and 2009 recently
0 Kudos
Message 3 of 3
(3,409 Views)