LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get LabView to plot a csv file

Solved!
Go to solution

I'm a novice at using LabView, and coding in general. For an experiment I'm working with, a data report is generated that I've converted into a csv file with three columns of data. I'm trying to take the first two columns, time and photon counts, and plot them on an x-y plot. It seems like the graph function can't use the csv data directly, so I've tried splitting the first and second columns into separate 1D arrays and plugging those into the graph. But for some reason, only the first column is being read -- when I each array as a matrix to see if they were being read in correctly, the values for the column 1 array scanned in and displayed fine, but the matrix for the column 2 array came out blank. I've enclosed a screenshot of my block diagram. Can anyone tell what I'm doing wrong?

0 Kudos
Message 1 of 4
(2,499 Views)

We cannot debug pictures. Attach your vi and a csv file, please.

 

If the column delimiter is a comma, you need to set that when reading the file (default is tab).

0 Kudos
Message 2 of 4
(2,494 Views)
Solution
Accepted by bkmacdonald96

Here's all you probably need. try it! (no clumsy dynamic data and express VIs, etc. XY graphs accept complex arrays and will graph IM vs RE. If the X values are spaced equally, a plain waveform graph is sufficient, though.)

 

 

altenbach_0-1581450367436.png

 

(You might need to tweak things depending on the exact file structure and localize decimal delimiter, etc.)

Message 3 of 4
(2,462 Views)

Ah, I see now. I forgot to tell it what the delimiter was. But yeah, that looks a lot simpler than how I was doing it. Thanks for the help!

0 Kudos
Message 4 of 4
(2,433 Views)