LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bar graph display

How can I display one byte of data in a bar graph style (Imagine 256 flat LED's stacking on top of each other in one column).  What I want to do is to light a segment of the bar graph according the data being presented.  For example, the data being presented is 55.  I want the segment 55 of the bar graph to light up, and stay lit.  The next data is 35, and I want the segment 35 of the bar graph to light up and stay lit.  Now I have two segments lit, 55 and 35.  I hope this is clear enough of a description.
 
Thanks in advance,
Sinh
0 Kudos
Message 1 of 7
(3,835 Views)
you could have the booleans as an array then all you need to do in set whatever index you get from your data true.

tell me if that is not what you want and i will try to think of something else
0 Kudos
Message 2 of 7
(3,828 Views)
Use the Square LED indicator and put it inside an array indicator.
0 Kudos
Message 3 of 7
(3,823 Views)
Thanks for the quick reply guys, but that solution did not work for me.  For example, if the byte data is 5 (binary 101) and I use that as the index to the array, the LED's light up according the binary number 101 (which is the 1st and 3rd LED segments), where as I want it to light up the 5th segment, such as 10000.
0 Kudos
Message 4 of 7
(3,797 Views)

You may want to post your VI so we can see what is going on.

Basically, you should have a 256 element array of booleans that are set to false which is fed into your loop through shift registers.  If you have a 5, then you should set the 5th element of your array to true.

It sounds like you may be doing some AND function with the 5 causing it to be cast into a binary number and turning on the respective bits.

0 Kudos
Message 5 of 7
(3,787 Views)

Start with this, but I don't think you will fit that many LED indicators on the screen very well. May have to draw boxes in the picture indicator.

 

0 Kudos
Message 6 of 7
(3,762 Views)
That Vi works.  This newbie thank you Smiley Very Happy.
0 Kudos
Message 7 of 7
(3,744 Views)