LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reinitialize All to Default BUTTON

Solved!
Go to solution

Thanks, it's really nice of you to be paid to do nothing. Know that in your future.

0 Kudos
Message 11 of 20
(1,653 Views)

You do realize the most of us are industry experts. We do not work for NI. We volunteer here to try to hep people get better at LabVIEW. We do this because we care and are willing to help the people that want to learn. I can assure you that my skills are in demand and are appreciated by the people and companies that I develop software for.

 

Just because you were able to hammer your screw into a board does not mean that it is the right way to get a screw into a board. It is sad that you are not willing to listen when we tell you there are much better ways to do what you are trying to do. It is also sad that you are not willing to listen to advice from people that have been doing this for over 20-30 years for some of us.

Tim
GHSP
0 Kudos
Message 12 of 20
(1,648 Views)
Spoiler
Okay, I don't want to keep fighting so I apologize about anything. Like I said, I'm merely making a calculator for my OWN personal use, I'm not trying to learn LabVIEW or anything, I don't need LabVIEW for anything else either, nor plan to use LabVIEW for anything else. I just have this program downloaded for a class a while ago. All I wanted was an answer to a simple question, and like I said, I'm not asking for HELP FOR ANYTHING ELSE. Imagine you needed to cook ramen in your life just one day and never ever planning to cook again. Are you going to go and  take a whole lesson and become a master at cooking? No. Anyway, sorry again, and good luck.
0 Kudos
Message 13 of 20
(1,638 Views)

I don't have LV2019, so I don't know how bad your code is... to answer your question " can [I] create a BUTTON that will reinitialize all these values". This is the best that I came up with...

 

Frozen_0-1588949011703.png

 

I have attached the vi so you can copy it to your program (or maybe study my vi a bit and understand how it works?)

 

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 14 of 20
(1,629 Views)
Solution
Accepted by topic author Phoenixkaito

As we said, you need a toplevel loop and a "init all to defaults" method in a case structure wired to a latch action button. You probably spent hours creating all these duplicate operations while a better programmer could have done the same functionality within minutes using arrays with code the total size of a postage stamp.

THere are serious issues that will prevent your current code from operating properly, for example you have equal comparisons with DBLs and you haven't explained what the bitwise OR is supposed to do.

 

As I said there is a VI method to init all and that's all you need. I already gave you the help link.:

 

altenbach_0-1588949498861.png

 

0 Kudos
Message 15 of 20
(1,621 Views)

Ah yes.. that is a bit more simple 🙂

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 16 of 20
(1,611 Views)
Solution
Accepted by topic author Phoenixkaito

@altenbach wrote:

You probably spent hours creating all these duplicate operations while a better programmer could have done the same functionality within minutes using arrays with code the total size of a postage stamp.

 


Here's how one of your code fragments could look like when using arrays and eliminating duplicate operations:

(I left out these silly visibility manipulations. There are probably some scaling mistakes, but it should give you some ideas. I would even use an array or cluster for the bulk of indicators.)

 

altenbach_0-1588953767664.png

 

 

.

0 Kudos
Message 17 of 20
(1,601 Views)

When you ask a professional driver why you're not getting very good gas mileage and he notes that you're always mashing the gas pedal, and then you get mad because, "I don't want to learn how to drive better, I just want you to fix the gas mileage issue", well then, of course the next response from the professional driver would be.  "Guess you're on your own, then".

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 18 of 20
(1,575 Views)

@billko wrote:

... he notes that you're always mashing the gas pedal, ....


I think in this case the analogy would be that he's mashing both the gas pedal and the brake pedal at the same time. 😮

(Gas pedal alone would potentially be slightly faster ;))

0 Kudos
Message 19 of 20
(1,569 Views)

I apologize for any misconception or rudeness I have displayed. I wasn't aware that when you told me about toplevel loops and stuff, it meant those things were required for the question I was asking. I thought you guys wanted to change my code, so I can practice my own. But I really just needed an answer to my question as I'm using this program only for this gaming calculator since I already finished the class long ago. Thank you.

Oh as for the car analogy, my side is more like after I messed up the gas stuff, I'll call in my dad, give the car to him, and never drive again. In that case, I don't see why I need to learn about any of it. Same here, I'm not going to use LabVIEW again later.

0 Kudos
Message 20 of 20
(1,555 Views)