LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Combo box to array

Also using inset into array does just that 'Inserts' into the array that means the array grows on every loop itteration (again execution highlighting shows this!)  What you need is 'Replace Array Subset' and a shift register .  You also need to initialise your array with the numebr of elements in the combo box before the loop starts.

 

I have a solution (not elegant) which does what you want - tell me what version of LabVIEW are you using and I will post.

 

Ken

0 Kudos
Message 11 of 20
(1,136 Views)

@Ken Naylor wrote:

 

I have a solution (not elegant) which does what you want - tell me what version of LabVIEW are you using and I will post.

 

Ken



I am using labview 10. It would be great if you can post the solution. 

Thank You

0 Kudos
Message 12 of 20
(1,120 Views)

Possible solution to your problem

 

Ken

Message 13 of 20
(1,117 Views)

@Ken Naylor wrote:

Possible solution to your problem

 

Ken


Yes this solution is almost similar to what i need. However, my requirement is to use combo box instead of ring. And the combo box should have values that match the item. Thats the basic twist and the part where i am stuck. 

Can you please guide me how to replicate it for a combo box??

0 Kudos
Message 14 of 20
(1,098 Views)

Hi,

I have attached a VI of the code I made. Its very crude and simple. Is there any smarter way to do it? 

Also I have read on many forums about how to disable/gray the controls but I could not find anything about how to disable/freeze the inidcator with a property node.

In my main VI there are two boolean buttons and I want to be able to use them to gray the indicators (i.e. stop updates). How can it be done?

Thanx in advance!!

Download All
0 Kudos
Message 15 of 20
(1,092 Views)

Hi,

 

One thing to note about your code is once you switch and element in the array to true it stays true. Meaning if you pick "hi" from the combo box it switch the corresponding element in the array to "true".  If you then pick "bye" it switch that element to "true" but the element for "hi" will remain true.  This may no be desired behavior for you application.  Have you thought of using an enum?

 

See the attached example for how to disable to indicator.

 

Regards,

 

Greg H.

Applications Engineer
National Instruments
Message 16 of 20
(1,070 Views)

Hi,

The program is required to retain the true value unless it is stopped (em working on how to reintialize to default after stop via invoke node). 

However, the vi you attached is in labview 11, while I have version 10. can u plz reload it in version 10. Thanx a lot for the help btw.

0 Kudos
Message 17 of 20
(1,061 Views)

Hi,

 

Please see attached.

 

Regards,

 

Greg H.

Applications Engineer
National Instruments
Message 18 of 20
(1,041 Views)

Hi,

It works. . .and this is exactly what i have been trying (the difference is that i pass data between subvis instead of the same one) but the problem is still there.

When we change the value of the fourth boolean control the indicator LED changes value even when it is disabled. What i want is that when the user disables it, the indicator not only gray out but its value should not change as well.

Is there any way to do it? I tired all possibles ways i can think of. But either they dont work at all or they dont work with the passing reference method i have used (see attachments of my previos reply).

Em getting depressed with each passing day 😞

 

0 Kudos
Message 19 of 20
(1,032 Views)

Hi,

 

The best way I can think to do that is to break use a shift register and stop data from being written to it when it is disabled.  See attached.

 

Regards,

 

Greg H.

Applications Engineer
National Instruments
Message 20 of 20
(1,018 Views)