LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making an LED Number

For my assignment, I am trying to make a number out of multiple LEDs. The aim is that by changing the number on the control, I can change the number that appears on the LEDs, like what the image below shows. I am not sure how to do this. I tried using Boolean buttons to do this as well, but I couldn't connect them to multiple LEDs.

 

Example.png 

The final intent is to set the LEDs up on a breadboard and output the data through a LabJack, and measure the voltage. Will this be possible?

0 Kudos
Message 1 of 5
(3,448 Views)

So you are doing the opposite of most questions we see on this: you have the LEDs and you want the number from it.  My suggestion would be to use a lookup table like here: http://forums.ni.com/t5/LabVIEW/7-segment-display/m-p/2842206#M830033.  Instead of Index Array, you will use Search 1D Array to find your cluster value.  If the value was not found, you will get a -1.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 5
(3,423 Views)

Using the 7 Segments (A-G) you could read in each value as a Boolean value, Build a Boolean Array, then convert the Boolean Array to Number.  You would need to create a lookup table (Case Structure) to convert each Boolean Array Number Value to a Decimal Value.

 

Example (Segments A,B,C  all ON and D-G OFF would be the Boolean Array (0000111) Number 7 representing Decimal Number 1.

0 Kudos
Message 3 of 5
(3,392 Views)

@crossrulz wrote:

So you are doing the opposite of most questions we see on this: you have the LEDs and you want the number from it.  My suggestion would be to use a lookup table like here: http://forums.ni.com/t5/LabVIEW/7-segment-display/m-p/2842206#M830033.  Instead of Index Array, you will use Search 1D Array to find your cluster value.  If the value was not found, you will get a -1.


I think he just wants the same thing as everyone else who has asked this judging by the phrase:

 

"The aim is that by changing the number on the control, I can change the number that appears on the LEDs"

 

If so, there are many topics on that.  Just search for "7 segment LED".  Like this one:  http://forums.ni.com/t5/LabVIEW/7-segment-display/m-p/2842064/highlight/true#M829984

 

As far as measuring the voltage with LabJack goes, yeah you could measure the 5V digital lines that light the LED segments but what would be the point?  Digital signals are either High or Low, On or Off.  Why bother measuring their voltage when you can just look at the LED indicator?

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 4 of 5
(3,373 Views)

Yeah, looks like it is the usual question that is asked. The link he sent me helped me a lot though.

 

I think I found a couple places for the 7-segment LED that weren't as good as the ones linked here and they started mentioning to try different stuff, so I ignored any that probably had good advice. 

 

It was just an idea, guess I didn't think it through properly. Thanks to everyone for the advice.

0 Kudos
Message 5 of 5
(3,333 Views)