# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## 7 segment 4 bit counter 4 bit output mod 10 using labview

Hello,

I am trying to make a 7 segment counter using labview with 4 outputs as I want to connect those 4 outputs with my other part of the project. Basically I want to make a 7 segment - 4 bit counter - 4 bit output mod 10 using Labview.

Thanks.

Message 1 of 6
(2,771 Views)

## Re: 7 segment 4 bit counter 4 bit output mod 10 using labview

Hi Jo,

what is a "7 segment 4 bit counter with 4 bit output"? Why have it "mod 10"?

Can yo show an example VI explaining your problem?

Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(2,762 Views)
Solution
Accepted by JO611

## Re: 7 segment 4 bit counter 4 bit output mod 10 using labview

You say "4 bit counter, 4 bit output mod 10".  Did you mean "4 digit decimal output"?  Note that "bit" means "binary digit", i.e. 0 or 1.

The solution is fairly simple.  You need a 10x7 2D array of Booleans, with the rows corresponding to the decimal digits 0..9 and the columns corresponding to the segments, set T/F depending if the Segment is On or Off.  The problem then becomes taking an Integer (which should be in the range of 0 .. 9999 -- you might want to check and raise an error if out of range) and reducing it to an array of 4 digits, 0..9, to be presented via a For loop to return the corresponding 7-bit (because you have an array of 7 Booleans, or "bits") Segment value.

Try coding this yourself.  If you have viewed (and practiced) the introductory material on LabVIEW, you should have no problem.

Bob Schor

Message 3 of 6
(2,755 Views)

Thanks !

Message 4 of 6
(2,753 Views)

## Re: 7 segment 4 bit counter 4 bit output mod 10 using labview

I need to generate a random number using this design. Can you help as soon as possible.

Message 5 of 6
(2,701 Views)

## Re: 7 segment 4 bit counter 4 bit output mod 10 using labview

Wow.  I looked at your PNG, and said "Someone doesn't understand Logic rules", not to mention that an incomplete picture such as the one you showed conveys little information other than you don't understand logic rules.

Why do you need help generating a Random Number?  Have you looked at the functions on the Numeric Palette?

If you want to Learn, you must put in your own Effort.

Bob Schor

Message 6 of 6
(2,689 Views)