06-27-2024 09:08 AM
Hello all, a newbie question here on what I am doing in a vi for test. The vi is using a footswitch to select a voltage from a displayed list of Indicators to be recorded, and then pull that voltage off an external voltmeter. The voltage is then examined to be in spec, and a Boolean indicator shows if it passes. Also the voltage is displayed in a Indicator which flashes when that particular voltage is selected with the footswitch. I'm attaching the rough development VI that still needs cleaning up. This VI does what I want it to do, so it isn't broken to my knowledge.
The VI works fine, but the full test being developed has 38 voltages to be measured and recorded, and I am curious if the same job could be more cleanly done with say an array or other method. As I understand it, I am looking at two different case structures (one to select the specific Indicator to display voltage and if it is in tolerance), and one to handle the "Blinking" Property Node of each of the 38 Indicators. There might be some method I am missing that might save some time and complexity.
Oh, each of the 38 voltages are at different levels and have different tolerances.
Thanks for your help.
06-27-2024 09:29 AM
HINT: Use File > Save for Previous Version... and back-save for 2018 or 2019. A LOT more of us will be able to open your code and comment.
06-28-2024 10:57 AM
Thanks for the response, attached is a zip of the vi and the sub vi that reads the voltmeter.
I have changed the vi a bit to implement the various Indicators in a Cluster, but am not clear how to use a Cluster with the Indicator Blinking Property Node.
Thanks again!
06-28-2024 02:06 PM
So, it sounds like you need a simple test sequencer. Creating hardwired cases for each measurement will quickly become confusing, and keeps you from easily modifying the test behavior. What you really want here is a state machine that initializes your DMM and external switch, then loads a configuration file with a table of information in a format like this:
You can use that to fill a LabVIEW table control.
You can then step through the sequence for every line in the table reading the DMM and filling in the ACTUAL and PASS? columns. When you're through, use the filled in control to generate your report.
I would advise you to focus on the data and avoid even thinking about fancy, blinking indicators for now. You can always color the table control red/green by line or use the report generator toolkit to create an Excel file with pretty formatting.
Here's an explanation of the state machine architecture in LabVIEW. Application Design Patterns: State Machines - NI
There is also a template for it built into LabVIEW and I can post a simplified version of what I would use if you need further help.
Your "states" should be along the lines of INIT HARDWARE, LOAD CONFIG FILE, GET USER INPUT, READ DMM, UPDATE DISPLAY, STORE RESULTS, CLOSE HARDWARE, GENERATE REPORT, SHUTDOWN.
See what you can come up with. The state machine is probably the most useful design pattern you can learn so it's time well spent to study it.