10-05-2018 07:06 AM - edited 10-05-2018 07:07 AM
hello guys
can someone help me with this calculator thing using ok buttons
Thank you so much
10-05-2018 07:18 AM
Help how?
Do you have a specific question?
Tip. All your buttons should have labels. Right now your block diagram has a bunch of terminals and you can't tell which goes to which button.
You can always hide the label on the front panel. But every control/indicator should have label and be visible on the block diagram
10-06-2018 01:42 AM
i made it till here. how do i concantenate the items in the calculator
10-06-2018 05:17 AM
Hi akshay,
did you notice the "Training" section on top of the LabVIEW board?
Guess what its for!?
how do i concantenate the items in the calculator
Right now your VI will run just once and stop immediatly (or better: as soon as an event occurs).
This way you will never have any chance to concatenate anything to the string…
1. When an algorithm needs to iterate more than once you need a loop in your code.
2. To keep values from one iteration of a loop to the next iteration you should use shift registers.
Both are very basic concepts in LabVIEW: please take those free online learning resouces!
10-06-2018 02:47 PM - edited 10-06-2018 03:27 PM
@akshay321 wrote:
i made it till here. how do i concantenate the items in the calculator
10-09-2018 04:33 AM - edited 10-09-2018 04:51 AM
i have added a while loop and shift registers
please tell me what should i attach to the shift registers
This is my first basic application on labview.
thanks,
Regards
Akshay
10-09-2018 04:51 AM
You need two shift registers. One (string) for the currently displayed string where new numeric characters are appended when certain buttons are pressed and updated with the result after a calculation has been performed. Another one (DBL) to contains the calculation stack, in the most simple case just the previously entered numeric.
It is nor sufficient to "attach" shift registers (whatever that means). You need to understand what they do. Once you understand their purpose, their use will become clear automatically.
10-09-2018 07:05 AM
Can i add case structure inside the event structure for the operations?
10-09-2018 07:30 AM
10-09-2018 11:57 AM
@akshay321 wrote:
Can i add case structure inside the event structure for the operations?
You could, but generally that is an "inside-out" way of thinking. Generally, you should have an event for each button because the event structure is the case structure. (LabVIEW help even refers to "Event Cases".)
Of course, there are exceptions to every rule, and your calculator happens to have such an exception. It's where the numbers (and the decimal point) are concerned. All have the same expected behavior, which is "when pressed, display it" and probably should be dealt with in one event case.