From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-30-2011 11:37 PM
Hi there,
I need help with Labview. I am currently doing a basic calculator project, whereby the output value is to be displayed on 7-segment. I'm only using 3 7-segments, so the maximum output value is 999.
My question is, how do I convert decimal numbers into separate arrays, so that it can be displayed on the 7-segment. For instance, if the output is 100, I need to display 1 on the 1st 7-segment and 0 on the 2nd and 3rd 7-segment.
Thank you for your time and assistance.
Kaye
05-31-2011 12:04 AM
Why make it more complicated than it has to be?
05-31-2011 12:16 AM
Thanks for the reply. I am actually using a NI-DAQ 6009, which is then wired to the 3 units of 7-segments.
I need to separate the decimal output into separate arrays so that the 1st array contains the value of the hundreds decimal point, the 2nd array contains the tens decimal point and the 3rd array contains the ones decimal point. This arrays are then used as outputs and will display each array value separately on the 7-segments.
Example: Output is 489, so the 1st array contains 4, 2nd array contains 8 and the 3rd array contains 9. Therefore the 1st 7-segments displays 4, the 2nd 7-segment displays 8 and the last 7-segment displays 9.
Thanks for the help.
05-31-2011 12:32 AM
Please, you don't have to explain what you want to do. It's very clear. What I don't understand is why you think you 'need' to do this. You could be the next addition to the Rube Goldberg thread.
If this is some academic excercise, show what you have tried so far? It would seem you could at least have converted to a string and gotten each character.
05-31-2011 12:55 AM
This is the part of the project that we are having problem with.The output needs to be separated, but we dont know how to do it.
05-31-2011 01:26 AM
Make an array for numbers 0-9 consisting of a Byte with the bit pattern needed to print each character.
Then to you only need to wire your number, e.g. '1' to this array and you'll get the 2nd value which could be sent directly.
/Y
05-31-2011 01:30 AM - edited 05-31-2011 01:30 AM
@aPpErEnTiCe wrote:
This is the part of the project that we are having problem with.The output needs to be separated, but we dont know how to do it.
That makes no sense. I still think what you are trying to do is a waste of time but if you want separate digits, you can do this.
I've asked twice why you are doing this. Why don't you answer this very simple question?
05-31-2011 09:42 AM
@Dennis Knutson wrote:
@aPpErEnTiCe wrote:
This is the part of the project that we are having problem with.The output needs to be separated, but we dont know how to do it.
That makes no sense. I still think what you are trying to do is a waste of time but if you want separate digits, you can do this.
I've asked twice why you are doing this. Why don't you answer this very simple question?
My guess is that this is a class assignment and controlling the separate part sof the 7 segment dsplay is part of the problem. This sounds a lot like a typical homework assignment.
06-01-2011 10:31 PM
Hi,
Thanks for the replies. We are doing this project actually for a short semester subject, where we are required to come up with project ideas, and we descided to create a simple calculator whre the output will be displayed on the 7-segment.
We have connected the circuit, and we get an eror when we execute it. We get an error msg if the output is less than 100.
06-01-2011 10:49 PM
Sorry. Use Format Into String with %03d as the format specifier.