01-22-2016 02:47 PM
I've read multiple posts on time stamping the X axis, but none have satisfactorily answered how to read a file that has a date/time and place it on the X axis in correspondence to the data points. The data/time is not the current time, but the time from previous data collection. I am going nuts trying figure out how to do this, it seems like it should be simple, yet there is no apparent way to do this. Anybody know how this can be done?
01-22-2016 02:58 PM
Are you using a graph, chart or x-y graph? It makes a difference. Is your time stamp a string or floating point number? Can you post an example file?
01-22-2016 03:19 PM
Thank you for the response. I will use whatever works, but usually I use a graph. Here is the file, all I want to do is put the time (first column) on the X-axis and the second column (my variable) on the Y-Axis.
01-22-2016 03:37 PM
You have to convert time stamps to a double time value (Seconds since ???) and your data to numbers (String to number) Doubles . A graph /chart has a T0 (Initial time ) Delta T (Time between samples) It looks like your Delta T is 1 second.
There may be a tool to convert text or delimited files to a tdms file format. TDMS is the National Instruments best method to save and view chart data. You should use some of the on line examples to see example code and use.
01-22-2016 03:56 PM
Something like that...
All your points have 1 second spacing, so I recommend waveform. twice less data in memory.
File is pretty large, it is better to read one line at a time, but data conversion is below.
01-22-2016 04:12 PM
01-22-2016 04:54 PM
wow you guys this gets deep quick... I thought it would be much simpler. Not sure what many of those functions even are on that template.
01-22-2016 07:09 PM
01-22-2016 07:59 PM
Oh I was unaware that the snipit could be used actively on the VI. It doesn't appear to be able to be saved in labview, it just saves as an image. Also, I am running Labview 8.5, so maybe that is part of the reason I can never view nor use the sample templates on these threads.
01-23-2016 12:40 PM
yes, 8.5 does not support snippets.
this can help (did not try it though)
https://lavag.org/files/file/118-getsnippet/
original snippet as vi is in attachment