LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with calculator

Solved!
Go to solution

Hello, I've made a calculator but i have problems to see the numbers on the display, also y can't do any operation. I know they are basic problems but i can't finish. I appreciate the help and attach the file of my work

0 Kudos
Message 1 of 7
(2,579 Views)

I can't open your VI because it was saved with LabVIEW 2022.

The latest version I have is 2021.  A lot of people on this forum are working with older versions of LabVIEW.

Save your VI to a previous version (menu → File → Save for Previous Version ...), then post it.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 7
(2,516 Views)
Solution
Accepted by topic author AngelS_

Hi Angel,

 

The numbers do not stay on the display because every time that the while loop iterates, it goes through the Timeout case in the event structure, and the saved values get lost because they are not wired.

 

As you can see in the picture below, just wire the shift registers to save the value for multiple iterations.

afort_1-1664890946446.png

afort_0-1664891055220.png

 

 

 

 

Message 3 of 7
(2,513 Views)

Hi Angel,

 


@afort wrote:

The numbers do not stay on the display because every time that the while loop iterates, it goes through the Timeout case in the event structure, and the saved values get lost because they are not wired.


What's the point of a TimeOut event when nothing is done within that event case?

What's the point of placing an additional wait in parallel to the event structure with its TimeOut event???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(2,499 Views)

@GerdW wrote:

Hi Angel,

 


@afort wrote:

The numbers do not stay on the display because every time that the while loop iterates, it goes through the Timeout case in the event structure, and the saved values get lost because they are not wired.


What's the point of a TimeOut event when nothing is done within that event case?

What's the point of placing an additional wait in parallel to the event structure with its TimeOut event???


And why would you connect to a local variable and keep the terminal disconnected outside the loop? Just wire to the terminal instead!

 

Once you attach a LabVIEW 2020 version (save for previous!), more people can give more targeted advice.

Message 5 of 7
(2,457 Views)

Hello everyone and thanks for your feedback.

 

I have solved the problems with the screen but I still have the problem of performing the operations, should I add numeric variables to store A and B?

 

I saved my file in version 21!!

0 Kudos
Message 6 of 7
(2,432 Views)

Hi angel,

 


@AngelS_ wrote:

I have solved the problems with the screen but I still have the problem of performing the operations,


Please step back and take those Training resources offered at the top of the LabVIEW board!

 

Why are there two input tunnels into the event structure for the value of the "A" shift register?

Why is "Screen" terminal unused, but local variables of that indicator?

Why are there "default if unwired" tunnels?

Why is there still a TimeOut event?

Why is there still a wait function next to the event structure?

 

Please solve all those questions before tackling another problem…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(2,421 Views)