08-11-2014 01:54 AM
Hi forum,
i need help again. I have a .csv file from labview where the first row is a timestamp:
08/10/201423:45:53.871 |
the other rows are floating data.
I would like to read this data and plot it with timestamp on the x-Axis. How i could do this in labview.
Thanks and best
Martin
08-11-2014 02:17 AM
08-11-2014 02:27 AM
Hi gerd,
thanks for ur fast help! I still dont get how i could plot the graph, so i will read the first row as a string format it into a timestamp and then i just can plot it on the x axis?
Best,
Martin
08-11-2014 02:30 AM
Hi Martin,
you could either create an XY graph with an array of timestamps used for the x axis - or you could create a waveform using a single timestamp (as t0) and a fixed dt…
In your OP you only provided a single timestamp and no additional information, so all I could suggest is how to convert that timestamp string into a "real" LabVIEW timestamp!
08-11-2014 02:38 AM - edited 08-11-2014 02:55 AM
hi Gerd,
i will have in the firt row an array of timestamps and multible data points in the second row. The graph should look like in the picture attached i want to plot the first row(timestamps) on the x axis and the data points on the y axis.
I attached my vi but its not working.
Thanks
Martn
08-11-2014 03:55 AM
08-11-2014 11:44 AM
Hi Gerd,
i still stuck i may dont get the idea. I attached my vi to plot the csv file. How i could read just the first row and format this to string the other row to foating points and then plot it.
Thanks for your help
Martin
08-12-2014 01:29 PM
Hi Martin,
sorry for delay, but next time you should save your VI in LV2011…
See this:
- read in the text file and convert to array of strings
- get columns (instead of rows!) and convert each column depending on its datatype to timestamp and float
- plot data on XY graph
You went wrong on
- the format specifier for SpreadsheetStringToArray
- indexing rows instead of columns
- the whole process of data conversion: after converting to float you convert back to string to finally (trying) to convert back to timestamp…
08-16-2014 01:02 AM - edited 08-16-2014 01:06 AM
HI gerd,
thanks a lot!
It works fine 🙂 one other thing how i would make it if i wana plot 2 graphs on the y scale?
THanks
Martin
08-17-2014 12:13 AM