LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

7 segment display


apok wrote: weird...7 segments are always indicators?

The problem description is clearly the reverse operation, and he even included a passworded solution that defines the exact required behavior.

 

Imagine you would have to write an application to read a 7-segment LED display with a camera and recogize the displayed numerical value. I outlined a solution higher up and was able to implement it in a few minutes. Works just fine.

 

Part of solving a problem is to actually read every word of the problem description, and not make assumptions after reading 30% of it. 😄 

0 Kudos
Message 11 of 23
(7,174 Views)

@altenbach wrote:

apok wrote: weird...7 segments are always indicators?

The problem description is clearly the reverse operation, and he even included a passworded solution that defines the exact required behavior.

 

Imagine you would have to write an application to read a 7-segment LED display with a camera and recogize the displayed numerical value. I outlined a solution higher up and was able to implement it in a few minutes. Works just fine.

 

Part of solving a problem is to actually read every word of the problem description, and not make assumptions after reading 30% of it. 😄 


thanks..

0 Kudos
Message 12 of 23
(7,167 Views)

@apok wrote:

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


Well, this is not the problem here, but here's an old VI I wrote in 2010 that does the same in much more readable code 😉

 

 

 

 

 

 

Back to the problem described in this thread:

 

It could easily be adapted for the current reverse problem using (1) "search array" and (2) deal with the situation when the pattern is not found.

Should take less than a minute....

 

 

 

Download All
0 Kudos
Message 13 of 23
(7,166 Views)

Didn't & segment displays use a BCD to encode and decode the segments ?? any one? I kinda remeber that for some reason ?LOL 🙂

HTH

My .02

22v10

0 Kudos
Message 14 of 23
(7,144 Views)

here's something fun.....hijack'd Smiley Tongue

Example_VI.png

EDIT: did not take care of the ZERO's left of the numbers as thought...late nite, will work on it in the morning

Message 15 of 23
(7,135 Views)

In my opinion you should use a 7 segment FONT. Don't do all that work with boolean.

Use an indicator for string or number, change FONT to 7 segment, change color to your choice, THATS ALL!!!

Use Google to find 7 segment fonts...

0 Kudos
Message 16 of 23
(7,126 Views)

@sjunge wrote:

In my opinion you should use a 7 segment FONT. Don't do all that work with boolean.


We are probably all well aware of the 7-segment font. This thread is about the reverse problem, translating an LED pattern into numbers, so a "7-segment font" would not be a solution.

 

Also, the "number-to-7-segment LED problem" was one of the tasks at the NI week 2010 speed coding challenge (AKA "beat Darren" :D), it is a demonstration of coding skills. Maybe you want to drive real discrete LEDs with digital outputs later, again a case where a 7-segment font would not work.

0 Kudos
Message 17 of 23
(7,108 Views)

@apok wrote:

here's something fun.....hijack'd Smiley Tongue


Here's a 10digit version I made back in 2010. (use format %010d to show leading zeroes).

 

 

Download All
0 Kudos
Message 18 of 23
(7,105 Views)

i hope i did not rube on this, but it took care of the leading zero's...

multi 7 segment display.png

0 Kudos
Message 19 of 23
(7,081 Views)

@altenbach wrote:

Back to the problem described in this thread:

 

It could easily be adapted for the current reverse problem using (1) "search array" and (2) deal with the situation when the pattern is not found.

Should take less than a minute....


Here is a partial solution to get you started. You still need to deal with the case where the output is -1 and change it to 11 (e.g. using "less than zero" and "select". Personally, a -1 is a more intuitive output, but does not correspond to your requirements). You also might need to change the cluster order so it corresponds to the order you wire the switches into the array before converting to a cluster. The nice thing with this method is that all patterns are nicely visible and can easily be changed if the patterns are slightly different (for example, your "9" does not light up the bottom LED, but mine does).

 

 

 

If you want fuzzy matches, use the lookup table solution I explained earlier. Now you can have multiple patterns that resolve to "9". try it too!

 

 

Also note how much uglier and confusing the code would look before this idea was implemented. 😄

Download All
0 Kudos
Message 20 of 23
(7,046 Views)