07-31-2018 02:49 PM
Here's what I had in mind earlier:
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!
07-31-2018 02:50 PM
@altenbach
What's a better way to read files and how to do it?
07-31-2018 03:34 PM - edited 07-31-2018 03:36 PM
@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. 😄
Again, you need to turn your program into a proper state machine first, of course.
07-31-2018 04:04 PM
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.
08-02-2018 10:05 AM
And I'm not sure what a proper state machine is...
08-02-2018 11:12 AM
@LabNoob14 wrote:
And I'm not sure what a proper state machine is...