# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## turn on a number of leds

Hi,

I want to do a sub-vi that does the following:

-User inputs a number (x)

-Turn on x number of leds

Message 1 of 7
(2,354 Views)

## Re: turn on a number of leds

just for those who may have the same doubt...

Message 2 of 7
(2,341 Views)

## Re: turn on a number of leds

Next time you post, you should provide a much more detailed explanation of what you want.  There is no way anyone could guess from your message that that is what you wanted to achieve.

Message 3 of 7
(2,335 Views)

## Re: turn on a number of leds

I'm still trying to figure out if he answered his own question, or whether there's still a question here?

Message 4 of 7
(2,323 Views)
Solution
Accepted by topic author Baioneta

## Re: turn on a number of leds

A much simpler way to accomplish the same thing is the Initialize Array function: set the value to a true constant and the size to the number of "LEDs" you want turned on.

Message 5 of 7
(2,302 Views)

## Re: turn on a number of leds

I would avoid converting doubles to boolean arrays. You should be working with integer values. It is possible you will not get the desired result depending on the fractional value of the double.

Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 6 of 7
(2,293 Views)

## Re: turn on a number of leds

thanks nathand, that way of doing it is much better because now i can hide the "off" leds by controlling the number of columns of the array

Message 7 of 7
(2,268 Views)