LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 digit 7 segment led

I am trying to design a counter that will count up to 99 with 2 digit 7 segment led with ni myrio. Can you help me?

0 Kudos
Message 1 of 8
(6,393 Views)

That is not a very detailed or helpful design specification!

 

What hardware do you have? What are you trying to count (electrical pulses, mouse clicks?) Do you reall have a seven segment led display (and if so, how do you intend to drive it) or are you emulating one in software to display on the screen.

 

What have you tried so far and what problems have you encountered that you need help with?

0 Kudos
Message 2 of 8
(6,385 Views)

I need to make it with myrio product. I have everything( Leds, cables, myrio device) but I need to built circuit in labview. ı put pictures, it must be like that but not 1 digit 2 digit.

Download All
0 Kudos
Message 3 of 8
(6,354 Views)

You don't build a circuit in LabVIEW.  You build a circuit with the LED's and wire and resistors and whatever power you need to drive the circuit.

 

In LabVIEW, you write code by building a block diagram to do what you want it to do.  Basically take a number, figure out what segments need to be turned on and off to show that digit, then write those true/false values to the digital outputs (like you see in the block diagram you attached.)

 

The easiest way to determine which segments to turn on and off is to create a 2-D array where each row represents a digit, and each column is true or false to associated with a segment.  Then you just need to use Index Array to pick a row based on your digit (0-9), then then wire that 1-D array to the digital outputs.

 

Since you want a counter, you just need to wrap that in a while loop or for loop which increments a value in a shift register.

 

Search the forums for 7 segment displays as this topic has some up many times before.

0 Kudos
Message 4 of 8
(6,346 Views)

Looks like you already have the hardware figured out and how to write to the DIO that control the diodes.  Now you just need to make a VI that figures out which DIO to turn on based on the digit you have.  RavensFan already gave you really good advice on how the build that function up.

 

How should the counter work?  Do you just count up once a second?  Do you count the number of times a digital line goes high?


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
0 Kudos
Message 5 of 8
(6,334 Views)

Here is a link with some examples for how to do a single digit.

 

http://forums.ni.com/t5/LabVIEW/7-segment-display/m-p/2842206#M830033

0 Kudos
Message 6 of 8
(6,318 Views)

thank you, I need to be do it 2 digit also, ı need to be do it with myrio device.

0 Kudos
Message 7 of 8
(6,315 Views)

@alprtlh wrote:

thank you, I need to be do it 2 digit also, ı need to be do it with myrio device.


Make a subVI for doing the conversion.  You can call this subVI twice, one for each digit.  To get the digits from your count just use Quotient & Remainder to divide by 10.  The Quotient will be your higher digit and the remainder will be your lower digit.


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
0 Kudos
Message 8 of 8
(6,307 Views)