08-02-2011 06:07 AM
I have a set of files in CSV format. The files contain two columns - X and Y.
I generated LabVIEW VI using SE 3.0. How can I make the VI to import different CSV files on user's request? Is there any way to change the configuration parameters of "Subset and Resample" step using controls in LabVIEW? Is there a way to control a configuration parameters via LabVIEW controls in general? I want to make more user-friendly control interface for my colleagues.
I would appretiate any ideas and help!
Attached are the VI, the SE project file and a sample CSV file.
Solved! Go to Solution.
08-05-2011 08:28 AM
SignalExpress Express VIs (and most Express VIs) do not provide configuration data inputs. However, it is fairly easy to get these. Right click on any Express VI and select Open Front Panel. This will cause the Express VI to be converted to a normal VI and will allow you to modify it to do what you wish to do. For example, in the case of the Subset and Resample Express VI, you can change the start and end constants to controls and connect these to the connector pane so they can be modified by the user while the program is running. Similar changes can be made to the Import ASCII Express VI.
If you are OK with running the program once each time you change a variable, that is about all you need to do. If you want to interactively change variables (start and end points, file names, etc.) you will need more program structure than the simple sequence you now have. I would recommend a producer/consumer type architecture with an event structure in a WHILE loop as the producer and a queue-based task handler as the consumer. When the user does something (e.g. change the file name), it sends several tasks to the task handler (for change of file name, this would be ReadFile and UpdateGraph or something similar). Your task handler would have tasks such as ReadFile, SetSubset, UpdateGraph, and Exit.
Read the LabVIEW help (or search these forums) for information on how to use event structures and queue-based task handlers. I would recommend using a shift register in your task handling loop to hold your data and subset information. If you need more help, let us know.
08-05-2011 09:08 AM
Thanks a lot!
First, I want to see what can I do on my own. I understand your idea(s)... very good post, very well explained! If I have any problems I would post here.
Thanks again for the advice!