05-08-2020 09:17 AM
Thanks, it's really nice of you to be paid to do nothing. Know that in your future.
05-08-2020 09:22 AM
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.
05-08-2020 09:30 AM
05-08-2020 09:46 AM
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...
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?)
05-08-2020 09:53 AM - edited 05-08-2020 10:58 AM
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.:
05-08-2020 10:02 AM
Ah yes.. that is a bit more simple 🙂
05-08-2020 11:01 AM - edited 05-08-2020 11:03 AM
@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.)
.
05-08-2020 01:08 PM
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".
05-08-2020 01:28 PM
@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 ;))
05-08-2020 05:06 PM
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.