LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting different cases from drop down in front panel

Solved!
Go to solution

Here's what I had in mind earlier:

 

PickFile.png

 

Of course you should also architect the VI into a real state machine so a new test can be selected later. Currently, your VI just rolls downhill with fixed test input once the program has started.

 

If not all files are always available and each file with a certain pattern in a specific folder is a "test", I would list the files ("list folder" limited by a pattern) and place the filenames (without extension or folder path) into a listbox. Now you can change the names and number of test by just adding more files to that folder. Use an event structure to listen for double-clicks on the listbox in order to select a new test, for example. Make it scalable!

Message 11 of 16
(1,061 Views)

@altenbach

 

What's a better way to read files and how to do it?

0 Kudos
Message 12 of 16
(1,059 Views)
Solution
Accepted by LiliMcDonald

@LabNoob14 wrote:

 

What's a better way to read files and how to do it?


Here's how to use a listbox that is autopopulated with tests from a certain folder. Now you can add and remove test without changing any code at all! Just add/remove files in that folder. 😄

 

GetTests.png

 

 

Again, you need to turn your program into a proper state machine first, of course.

 

Message 13 of 16
(1,055 Views)

altenbach,

 

Thank you for your examples, I'll do my best to implement them. I get the basic principle of a state machine, but I haven't really studied it at all. I'll just point out that I'm a labview noob. Once I get done with this little project I'll go back to the basics and start learning more of the fundamentals of labview.

0 Kudos
Message 14 of 16
(1,045 Views)

And I'm not sure what a proper state machine is...

0 Kudos
Message 15 of 16
(991 Views)

@LabNoob14 wrote:

And I'm not sure what a proper state machine is...


State Machines


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 16 of 16
(986 Views)