LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using ring to plot a csv waveform graph

Solved!
Go to solution

Hi,
Could someone show me how to use ring to select a particular csv spreadsheet file and plot that file in waveform  graph.

Download All
0 Kudos
Message 1 of 26
(3,395 Views)

I just started using LabVIEW can some please show me how to select a particular file to plot on the waveform graph. The 3 emg file are csv files in zip folder and read into LabVIEW.
Thanks.

Download All
0 Kudos
Message 2 of 26
(3,305 Views)

Hi zoe,

 

how to use ring to select a particular csv spreadsheet file and plot that file in waveform  graph.

The ring gives you an integer value. You can use this value as an array index (using the IndexArray function) with an array of filepaths to select your "particular csv spreadsheet file". Once you loaded the CSV data you can display it in a graph…

 

Unfortunately you didn't supply any (example) CSV file(s).

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 26
(3,349 Views)

Hi GerdW,
the csv file are excel spreadsheet in the zip folder called EMG.csv.zip. could please explain more clearly how I'm supposed to index the csv files with index array and use the select option in the ring.
Thank you.

0 Kudos
Message 4 of 26
(3,344 Views)

Hi zoe,

 

the csv file are excel spreadsheet in the zip folder called EMG.csv.zip.

No, there is just a VI in the ZIP!

Btw. "csv files" are plain text files, but Excel is able to read them. But they are NOT "Excel files"…

 

how I'm supposed to index the csv files with index array and use the select option in the ring.

I guess you know how to use the IndexArray function?

With ListFolder you can get an array of filepaths and you can use IndexArray to select one of them. The index iput would be connected to your ring control.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 26
(3,339 Views)

I advise you use a ComboBox instead of a Ring.  A ComboBox has a string data type, which would eliminate part of your code to index out the Strings array.


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 6 of 26
(3,337 Views)

Hi, 
thank you for your help. I'm try to understand but this is my first time using labVIEW. Could u show me an example on how to use the Combobox because what I'm try to do is select the file from options and click on the load button to load file into LabVIEW and plot the selected EMG.

0 Kudos
Message 7 of 26
(3,325 Views)
Solution
Accepted by topic author zoe5768

Like I said, the ComboBox just acts as a string control.  You can use the Strings[] property to set the allowed values.  But after that, just use the Build Path to generate the path to your selected file.


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 8 of 26
(3,316 Views)
Solution
Accepted by topic author zoe5768

To add to crossrulz's example, this would preload the (*.csv) filenames from a directory into the combo box

 

Use ComboBox.png

Message 9 of 26
(3,309 Views)

Hi,
I have 3 emg.csv file and I want to calculate the RMS, average value and total time recording of the waveform graph of each emg.csv file separately with the click of a button. Any help is very much appreciated. thank you.

Download All
0 Kudos
Message 10 of 26
(3,332 Views)