LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Calculator Help Please.

Hello, I could really use some help making a Calculator for one of my classes.  Does anyone have a sample VI diagram that I could look at?  If anyone is interested, its suppose to be a six function calculator (add, subtract, multiply, divide, square and square root), the input is preferably push buttons from 0-9 with 6 separate push buttons for the functions. The output is a numeric indicator at the top of the screen.  If anyone could help me out at all I would greatly appreciate it.  I've search the forum for calculator VI but I couldnt seem to find one.  My email is thompsonknight@yahoo.com  Thanks a lot, I'm using Labview 8.0 if it matters.


Message Edited by Thom25 on 12-09-2007 05:32 AM
0 Kudos
Message 1 of 16
(5,747 Views)
I don't feel comfortable giving you the answer to your school assignments, but you may want to consider using an event structure as your base architecture. You can use shift registers to keep track of the numbers entered by the user. You may also want to consider using RPN such as that found on HP calculators as the basis for your calculator. It can be easier to program. Good luck.
Buddy Haun
Certified Trainer, Former Alliance Member, LabVIEW Champion
0 Kudos
Message 2 of 16
(5,734 Views)
What about an equals sign?? How will they end the equation?? What if someone enters 2+2+3+4??
0 Kudos
Message 3 of 16
(5,711 Views)
Hmmm, that's a really good question.  There wasnt any mention of an equals sign in the assignment, so I'm not sure if he thought it was implied or what?
0 Kudos
Message 4 of 16
(5,700 Views)
Hmmm, yeah I rechecked the directions and it didnt indicate anything in regards to the equals sign.
0 Kudos
Message 5 of 16
(5,670 Views)
Buddy Haun recommended RPN. That does not require or even use an equals sign, although you may need an enter button.

Lynn
0 Kudos
Message 6 of 16
(5,648 Views)
I have attached a sample program to demonstrate how to process events and some good data structure methods (may be a bit overkill for this application, but maybe not).  It is also amusing.  It is from an NI-Week presentation I gave a few years ago.  If you need an earlier version of LabVIEW, I have a 7.0 version as well.
0 Kudos
Message 7 of 16
(5,627 Views)
You could always cheat and just use an embedded .NET calculator. In fact, there's a shipping example in LabVIEW that does this exactly. Smiley Wink

Not that I'm condoning cheating, of course. Smiley Very Happy
0 Kudos
Message 8 of 16
(5,618 Views)
haha, no ummm of course not... I would never condone cheating either *cough cough*  Thank you DFgray, it says I need to download a feel to open the one you posted.  So I'm doing that now!
0 Kudos
Message 9 of 16
(5,594 Views)
DFGray, I downloaded some kind of stuffit program to open the file but its giving me an Engine Error, saying that Archive Verification Failed?  Is there any way I can open the VI separately?
0 Kudos
Message 10 of 16
(5,584 Views)