ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 23 条)
13,034 次查看

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

0 项奖励
2 条消息(共 23 条)
13,032 次查看

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.

下载全部
0 项奖励
3 条消息(共 23 条)
13,024 次查看

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 项奖励
4 条消息(共 23 条)
13,019 次查看

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 项奖励
5 条消息(共 23 条)
13,002 次查看

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 项奖励
6 条消息(共 23 条)
12,999 次查看

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 项奖励
7 条消息(共 23 条)
12,986 次查看

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 项奖励
8 条消息(共 23 条)
12,970 次查看

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 项奖励
9 条消息(共 23 条)
12,965 次查看

@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 项奖励
10 条消息(共 23 条)
12,961 次查看