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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculator programme not working if second number is greater than 1 digit.

Solved!
Go to solution

I have been putting together a calculator on labview, which works except for when I input a second number the calculator doesn't produce the correct value if the second number is more than 1 digit. I believe this is down to the use in shift registers and the fact the operation is forgotten when a button is pressed. I've attached the programme, if anybody could confirm that this is the problem / suggest potential methods around this problem that would be a great help

0 Kudos
Message 1 of 5
(2,474 Views)

Use Default if Unwired.  Several of your tunnels are set this way, including the orange (double precisions) wire where you are storing your first operand.

 

If you execute an event where a wire is not wired through, the tunnel will output the default value (empty for string, zero for double), and the shift register will then forget whatever it originally had in it.

0 Kudos
Message 2 of 5
(2,465 Views)
Solution
Accepted by topic author Alxs93

@RavensFan wrote:

Use Default if Unwired.  Several of your tunnels are set this way, including the orange (double precisions) wire where you are storing your first operand.

 

If you execute an event where a wire is not wired through, the tunnel will output the default value (empty for string, zero for double), and the shift register will then forget whatever it originally had in it.


I think you meant don't use Default if Unwired?  I think you meant to tell him to use Linked Input Tunnel --> Create and Wire Unwired Cases instead?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 3 of 5
(2,443 Views)

You're right.

Uncheck the setting on the tunnel "Use Default if Unwired"

 

I wasn't thinking of Linked Tunnels at all.  Just that they need to wire through all the cases.  Of course Linking the tunnels and setting that to wire them is the more automatic way of doing it.

Message 4 of 5
(2,439 Views)

Thank you! The programme works perfectly now! 

0 Kudos
Message 5 of 5
(2,414 Views)