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.
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.
03-03-2019 01:00 PM
I have a very simple app I created to demonstrate a few fundamentals to my students. I created a really basic While loop that runs on a 100ms display. I use 4 Quotient and Remainder functions to divide the iteration count by 36,000 / 600 / 10 and 1 respectively in order to create an hours/minutes/seconds/tenths display. I wanted to show the students how much more elegant you can make an app, simply by adding a Start button, rather than using LabVIEW's Run arrow.
The problem is that, after adding the Start XControl, and placing my loop in a sequence structure and executing that sequence frame via the start button, the loop no longer responds to the Stop button.
I'm sure it's simple, but I'm apparently sleep-deprived. (That and short-term memory issues ever since November 2015 when I suffered a sudden cardiac arrest while running a Thanksgiving day race)
Solved! Go to Solution.
03-03-2019 01:08 PM - edited 03-03-2019 01:22 PM
03-05-2019 06:36 PM
Altenbach, you've provided quite a few helpful responses over the years, so I need to ask one more question. Was there a bug up your butt Sunday, or it is personal? I'm not sure if you've ever taught students before, but sometimes in a basic intro class, you might not include the more refined methods, because they may only lead to questions that are well outside the scope of what you've been tasked with covering. How about if I post a question in the future that you feel is beneath your dignity to answer that you just move along, shaking your head in amazement at my stupidity. Personally, I've never felt the need to blast others when they post a question that I feel has an obvious answer. In fact, I love sharing what I DO know with others. It's why I teach. And I'm ALWAYS willing to admit my faults/weaknesses/deficiencies and ask for guidance from those smarter than myself. In fact, that's what I did Sunday.
If your're still reading, allow me to address your questions one by one.
1. Sorry about overlooking the fact that you would not be able to see the X-control that I created. I based it on a video I'd watched online, posted by another developer (he must be an idiot too). I saw the logic in creating a start button so that if a VI was deployed as an executable, it could be launched and then actually started when the user chose to start it.
2. I hadn't thought about the state machine in the role of an overall VI start button. It's a much more widely-accepted convention. I haven't used them that much, and like I said, I'm always willing to broaden my horizons. I VALUE what others can teach - I just tend to react negatively to being crapped on - probably a result of having served in the military for 11 years.
3. Instead of chastising me about my indicators having the wrong representation, you might have just pointed out the fact that 64-bit is a waste of memory resources . I overlooked it. Crap, rather than the 32-bit you suggested, 16-bit or even 8-bit would have been sufficient for the demonstration. Seriously though, is it that much of a transgression when I'm trying to teach students in a basic data acquisition class that includes an intro to LabVIEW?
4. The sequence structure WAS completely unnecessary, except that it was necessary given the rest of the application that I removed before posting since I felt it just confused the issue I was seeking help with. Amazingly enough, when I removed it and connected my evil X-control directly to the while loop, it worked perfectly (so thanks for that).
5. Man! You were right about the last Q and R being unnecessary as well! I probably would have done a better job if I wasn't hopped up on the muscle-relaxers that I have to take when back-spasms bring me to my knees (another reminder of my 11 years beating my body up on three ships). Connected the Remainder terminal to that tenths indicator and voila! Works like it should.
6. And yes, you're right. I chose to do it this way in order to teach the integer math. Your way is MUCH better and I was reminded of things I'd forgotten having been away from LabVIEW almost completely the last three years. I just hope you'll continue using the opportunity you have to share your knowledge with others to...share your knowledge with others. I'm not in your class when it comes to LabVIEW development, but then again, I'd be willing to bet I could show you a few things in a wood shop. And I would't cut your hand off to prove the saw is sharp. 🙂
Thanks again for your help. Seriously.
03-05-2019 07:17 PM
I hope you feel better now. 😄
(I suggest you come back in a few days and re-read your post for a hopefully new perspective. At that time consider asking a moderator to remove it. Take care.)
03-05-2019 07:22 PM
Incidentally, I realize that I32 is as low as I can go and still get 36,000
And honestly, thank you again
03-05-2019 07:41 PM
03-06-2019 12:46 AM
A few quick notes about the points: