LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Led

Solved!
Go to solution

Hi,

      Here is a simple question,but Iam not getting the expected results.I have a numerical array with values as zeros and ones only.I want to display them in an LED array with one-LED ON and zero-LED OFF.Attached is my VI.please help.That is for one values the LED will glow and for zeros the LEDs will be OFF.

0 Kudos
Message 1 of 7
(2,495 Views)
Solution
Accepted by topic author josy

Hi josy,

 

try this:

check.png

 

Or that:

check.png

(Avoiding RubeGoldberg comments 🙂 )

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(2,481 Views)

Hi,

 

Here is one way to do it. It's not the best way to do it, but it gives you the result you ask for. Try getting the same result with a differet approach. For instance without the for loop, like GerdW's second solution, which is the best.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 3 of 7
(2,479 Views)

The function Number to Boolean array takes the number, converts it to binary then creates an array.  Your VI will output the binary representation of the last element in the numeric array.  What you need is something like this.  It assumes that the entries are either >1 (True) or zero (False)

 

Ken

 

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

@Ken_Naylor wrote:

The function Number to Boolean array takes the number, converts it to binary then creates an array.  Your VI will output the binary representation of the last element in the numeric array.  What you need is something like this.  It assumes that the entries are either >1 (True) or zero (False)

 

Ken

 


And the reason you have a while loop is because?

0 Kudos
Message 5 of 7
(2,458 Views)

The original problem was in a loop and I just modified it!  On review it [the loop] is a bit (!) redundant

0 Kudos
Message 6 of 7
(2,454 Views)

Hi,

     Thanks for reply.

0 Kudos
Message 7 of 7
(2,408 Views)