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.
07-09-2013 09:11 AM
Hello everyone. I was on here a week or two ago with a program I had written. I received a lot of well deserved negative feedback. There were a lot of things I had done that either didn't make sense, was sloppy, or did not fit the accepted rules of LabVIEW programming. I am returning to you and your expertise after this holiday weekend to take another look. I have revised the program using the suggested JKI State Machine, but I want to make sure there are not any huge glaring issues plaguing my code.
Thank you all for your help!
Nukem
LabVIEW 2010
07-09-2013 10:28 AM
Nothing "Glaring"
Some issues.
Why not just run the code to configure the FG? Heck you could init your test equipment and report the error for missing coms! The point being you want an operator with a IQ of 3 to be able to "Push the button - get a banana" Humans reading and following directions is error prone. Automated test should not be.
Overall I like it! Kudos
07-09-2013 11:52 AM
I agree with Jeff, it looks good now. The State machine is probably made a few LV versions back. Usually that's a non issue but FP.Open is now an "elderly" function. According to help you should change it to Invoke node -> Front panel Open.
How does it feel for you? Do it feel more expandable, reusable and easier to navigate?
Good Job!
/Y
07-10-2013 10:30 AM
Thank you both for your input. Since both of you touched on it I will ask this first: Since I plan on packaging this as an exe for my professor and future students to use do I really care about the front panel open/close state? As long as I remove it from the queue is there any harm in deleting it entirely?
Type Defs: I've heard that thrown around and I looked up very briefly their use and it appears to be a very good idea. I have run into that problem already with having to triple check all of my bundle/unbundle commands for consistency after changing that case. I tried adding my front panel to a type def control file but it was giving me an error because of multiple controls. How do I combine my front panel controls into one master control that it will accept?
Or am I just going about it wrong?
I did fix all of the broken error data flow issues.
Now that last issue: I would love to combine those two steps but I have not had much luck so far. The LIA has not consistently needed the same steps to configure, but I will look into that further. The other is a function generator that does not support LabVIEW and required significant searching to even get to work on 64 bit windows. It comes with a small program that turns the device on and allows for the user to select and modify the output. Is there a way to embed this program into my VI? Perhaps in another tab or as a popup? The program does need to continue running or the signal is lost.
In a perfect world I would dig around and interface the device with LabVIEW directly, but that is far beyond my abilities.
Thanks for the help!
Nukem
LabVIEW 2010