LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3 digit LED display

Hello there ,

I have made a single digit display using case structure but i need to display 3 digits 

can anyone help me

 

0 Kudos
Message 1 of 7
(2,985 Views)

For integers you can split number into digits

digit.png

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

Hi akshay,

 

some comments on your VI:

- NEVER delete the label of controls/indicators! NEVER hide the label in the block diagram!

- use a cluster to bundle the boolean indicators of your 7-LED display. Then use a cluster constant to set the indicators.

- the "Numeric" control needs a better (aka "more descriptive") label, and should be an integer type!

- use an array of those clusters mentioned before and a simple IndexArray function instead of creating a case structure with 10 cases and lots of boolean constants…

 

i need to display 3 digits 

After placing those LED indicators in a cluster you can easily create an array of those clusters to allow more than one digit…

(Simple generic rule: when you need a data element more than once you should use an array of those data elements!)

Best regards,
GerdW


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

Here is a little help on your homework. Instead of using a case structure, I like the idea of a Look-up Table. Instead of having 7 seprate LED segments, combine them into a cluster. That way you can create an array of clusters to display all digits of your number. Between this and Artem.SPb's idea (edit: and GerdW's ideas), you should be able to do the rest.

 

Edit: a LUT of Cluster constants as GerdW mentioned would be a lot easier than what I did. 

 

LED Digit using LUT.png

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

Thank you so much for the help

but i'm getting a broken wire

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

Hi akshay,

 

when you move that cluster into an array you also need to convert the wire to hold an array of clusters…

 

Didn't we mentioned that before?

Best regards,
GerdW


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

You are indexing Single Element for Display but the Indicator is array.

 

Change array to Element (LED Display)

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 7
(2,881 Views)