NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Atanasov
Posts: 6
0 Kudos
Accepted Solution

Multiple CSV files in Signal Express - processing and graphing

Hi,

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!

Best regards,

Rado

PS

Attached are the VI, the SE project file and a sample CSV file.

Trusted Enthusiast
DFGray
Posts: 2,563

Re: Multiple CSV files in Signal Express - processing and graphing

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.

Using LabVIEW 2009 - 2012 on Windows 7 64-bit
Member
Atanasov
Posts: 6
0 Kudos

Re: Multiple CSV files in Signal Express - processing and graphing

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!

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page