LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

7 segment display

Hi, I need help with this program. Develop a "vi" that allows visualizing the numbers 0 to 9 depending on the state 7 suiches located as a 7-segment display. For example if all 7 are activated suiches should show number 8 or control switches are turned "a" and "b" must show a one. The numbers should be displayed in a numeric indicator.
0 Kudos
Message 1 of 23
(9,394 Views)

We are happy to help you with your homework, so please tell us what you tried so far and where you got stuck.

0 Kudos
Message 2 of 23
(9,392 Views)

This is what I have and I also have an example for you to see what i need to get.

I started making a boolean array with the 7 switches and I conected it to a boolean-numeric conversor and then I conected that to a numeric display.

But I need that when I make a 3 with the switches, an other display can show the number 3.

I have no idea how I can make that happens because Im new in labview.

Thanks for the help.

Download All
0 Kudos
Message 3 of 23
(9,384 Views)

It seems like you are solving the reverse problem.  (Actually, the problem description is rather poor.)  Typically you enter a number, then use boolean values to determine what LED's to turn on.

 

Even though the problem says "switches", that just doesn't look right.  Those types of switches just look the same whether they are off or on.  Especially when some are horizontal and some are vertical.  Try LED's.  Or at least a boolean "push-in" switch that lights up when depressed.

 

Your Array to Number function does nothing except give you a binary representation of which switches are depressed.  It does nothing to decode it to a digit that would be in a 7-segment display.  That can help you determine which set of switches are depressed, but certainly isn't what you should be displaying on the screen.  Side question, what are you supposed to show if the switches you press don't equal any meaningful digit on a 7 segment display?

 

Why did you attach the second VI which is password protected?

 

 

0 Kudos
Message 4 of 23
(9,379 Views)

I know it seems like I´m doing it backwards, but I'm not, this is what I need.

Whe I move the switches to creat number 7, the numerical display must show number 7. Did you see the example??

I can't make it with leds (which will be easier).

I don´t know how else I can explain to you what I want to do, and is frustruating because I need to do that homework.

 

 

I hope you can help me.

 

20140508_200824-1_resized_1.jpg

 

 

0 Kudos
Message 5 of 23
(9,362 Views)

I guess the password protect VI is the template that should be duplicated.

 

Apparently, for eacxh recognized pattern, it should show the number, and for all other patterns, it should show "11".

 

Obviously, what you did so far does not solve the problem, but you are close. You could create a U8 lookup table for all 128 different LED combinations, then use the number you just got and index into it. Start out with all elements at 11, then change the 10 elements corresponding to recognized patterns to the  corresponding number.

0 Kudos
Message 6 of 23
(9,359 Views)

Why can't you use LED's?  They are normally indicators, but you can change them to controls.

 

I would make an array of values that correspond to digits 0 through 9.  Go ahead and use your boolean array to number to convert the "switches" on/off state into a binary number.

 

When you read the switches like you are doing and convert from boolean to a number, search the 1-D array for that number.  The index found will be the digit  (assuming you create your 1-D array correctly).  If you search the 1-D array and it returns a -1, then you know it is the undefined number which I guess is the 11 for whatever reason.

 

Element 0 would be the binary equivalent of the 6 segments lit up.  Element 1 would be the binary equivalent of the 2 segments ....

0 Kudos
Message 7 of 23
(9,346 Views)

get 7 leds into a cluster, reorder them (a-g) as #0-7 and use the array to cluster function...dont forget to size that function,otherwise broken arrow. make your pattern with your bool arrays into a 2D. then just index the # to output the 1D pattern that matches

Example_VI.png

Example_VI.png

0 Kudos
Message 8 of 23
(9,330 Views)

That's what the assignment seems like it should be.

 

But he said he needs to do the reverse.  Take the cluster, convert to an array, and then decode what digit that corresponds to, if any.

0 Kudos
Message 9 of 23
(9,325 Views)

@RavensFan wrote:

That's what the assignment seems like it should be.

 

But he said he needs to do the reverse.  Take the cluster, convert to an array, and then decode what digit that corresponds to, if any.


weird...7 segments are always indicators?

0 Kudos
Message 10 of 23
(9,321 Views)