02-11-2020 12:19 PM
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?
Solved! Go to Solution.
02-11-2020 12:33 PM - edited 02-11-2020 12:36 PM
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).
02-11-2020 01:49 PM
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.)
(You might need to tweak things depending on the exact file structure and localize decimal delimiter, etc.)
02-11-2020 04:00 PM
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!