LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with combobox : value never change

Hello,

 

I have made a VI for control a motor.

There is my subVI

my SubVI.JPG

 

I have create a VI with a combobox to control the motor with 3 commands.

my VI.JPG

 Each command send a string who the motor understand.

 

My issue is when i choose a command, in my subVI that doesnt change.

 

What i have to do to make my VI working with the combobox ?

 

Thanks for your help.

0 Kudos
Message 1 of 3
(2,795 Views)

1) Put a delay in your loop - you are hammering the serial port and wasting CPU.

2) If you wire your combo box into the VI as shown, it can change only at the startup of the loop, because once it starts looping, it has to finish.

 

Try running it as one VI rather than a sub-VI and you should see what I mean.

 

You need a parallel process in order to control the combo box. In other words, you need a parallel loop architecture.

Message Edited by Broken Arrow on 06-08-2010 09:56 AM
Richard






0 Kudos
Message 2 of 3
(2,788 Views)
Once your subVI is running changing the value in the parent VI will do absolutely nothing, since the subVI has already received its data from when it was first called. You need to have the combobox on the subVI, and change it from there. Either that, or you need the loop in the parent VI.
0 Kudos
Message 3 of 3
(2,776 Views)