LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

boolean array

i want to put on/off Boolean lights in an array and when another ok button is pressed an additional light is added to the bottom of the array, please help! I used a loop but  I also can't turn them on and off for some reason.

0 Kudos
Message 1 of 7
(4,565 Views)

How can we help if you don't show us what you've done so far?

 

Please attach your VI.

0 Kudos
Message 2 of 7
(4,553 Views)

this is the output

0 Kudos
Message 3 of 7
(4,548 Views)

That is not a VI.

 

That is a blurry Jpeg picture of a front panel.  It doesn't help us help you.

0 Kudos
Message 4 of 7
(4,540 Views)

Hello,

I've quickly build this VI (this is one way of doing it).

You can check if that's what you need.

Regards

 

0 Kudos
Message 5 of 7
(4,491 Views)

EliasN wrote:

I've quickly build this VI (this is one way of doing it). 


  • If you place the array indicator before the event structure, you don't need the local variable to clear it first
  • If you would use "built array" (highly recommended), you don't need to measure the array size over and over. "Insert into array" is not the right function if we simply want to append.
  • Adding TRUE LEDs to an initially empty array seems silly. It would be better to have a fixed size array of sufficient size (all FALSE), then light them in order using "replace array subset".
  • ...
0 Kudos
Message 6 of 7
(4,480 Views)

@dinner wrote:

i want to put on/off Boolean lights in an array and when another ok button is pressed an additional light is added to the bottom of the array, please help!


As said earlier, you probably want to use an array of fixed size in a shift register. and change elements from false to true in order. Do you know what a shift register is?

 

@dinner wrote:

I also can't turn them on and off for some reason.

From the above, you seem to use an array indicator. Compared to a control, an indicator cannot be operated directly at run-time. If you want to also be able to operate the array elements directly, you need to make it a control. In this case you would need a local variable to do programmatic value changes.

 

If you don't understand what I am saying, you need to start with a few basic LabVIEW tutorials. If you would post your VI, we will help you make it work and give more specific advice.

 

 

0 Kudos
Message 7 of 7
(4,478 Views)