LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

28 segment display with decimal point

Solved!
Go to solution
Solution
Accepted by topic author VeritasAequitas

Take a look at this.

 

I took the code I had earlier and added in the boolean array cluster from Lynn's code.   I noticed you had some values beyond index 9, but I couldn't figure out what they were.  I made indices 10 through 15 be the characters a through f so that the display could show hex characters.  But the code as written will never get to those digits.

 

I had modified my code earlier to make the background black and use larger LED segments that came together because I thought it was easier to read than the small bars on white background you had earlier.  I added an 8th segment for the decimal point.  I also modified the cluster so each segment had a label for its segment letter.  That way the bundle and unbundle by name functions would work on the cluster.

 

I made the number of digits a control, so more digits can be shown.  The display array would just have to be expanded to show more elements.

 

I hope you like it.

Message 21 of 27
(1,799 Views)
This wasexactly what i was looking for thank you. Now i'll go through it and make sure i understand it all. Thank you.
0 Kudos
Message 22 of 27
(1,791 Views)
i have one more question as to negative numbers. how could i modify the program to work with those. I assume it would just involve adding a bollean array for the negative symbol and moving all the numbers over one?
0 Kudos
Message 23 of 27
(1,770 Views)
Yes, that is what I would do.  It just means a bit more code to be able to handle that situation.
0 Kudos
Message 24 of 27
(1,763 Views)
I am not sure if you know this but there is also a problem with your code. Its doesn't like numbers smaller than 1. if i try .09 the goes wacky and messes up the output. I'm not sure how to fix this annoying issue
0 Kudos
Message 25 of 27
(1,760 Views)
I found a very easy way to get the negative numbers to work. Now i cant figure out how to get the number like .01 to work correctly. I'll upload exactly what i have and hopfully you could shed some light on this issue. Thanks again, Adam
0 Kudos
Message 26 of 27
(1,746 Views)

This is getting to be scope creep.

First a number.

Second, decimals.

Third, negative numbers

....

Smiley Wink

 

I hadn't tried numbers less than 1 before.  The scheme I was using to get to the first number by using log base 10 didn't work with those.

 

Instead, I am going to let the number to string function do the formatting, then build the digital display array accordingly.  I note the location of the decimal point then strip it out since we do not want it to be its own character in the display.  If you are using longer numbers, it may be necessary to change the format string for the format into string function to account for needing more digits.

 

See Attached.

Message Edited by Ravens Fan on 11-02-2008 03:41 PM
0 Kudos
Message 27 of 27
(1,732 Views)