LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

excel timing

I am reading in data from an excel spreadsheet.  I sampled the data at 1000Hz.  The 2 columns of my spreadsheet have voltages and corresponding times (in millisec).  However when I graph the data it appears the instead of reading milliseconds the “excel read-in” reads seconds.  Is there any way to format the reading process or to convert the timescale?  Thanks

0 Kudos
Message 1 of 8
(3,165 Views)
How exactly are you reading the file (which LabVIEW function) and is the time relative/absolute or elapsed? The default dt for a graph is 1 and you need to either specify the XScale.Multiplier property or pass it a waveform data type in which you set the dt. You create a waveform data type with the Build Waveform function. Pass it the Y array from your data at the dt. You may have to calculate the dt from the data if you have written it as relative/absolute time (i.e. subtract time at data point 0 from time at at data point 1.). It you used relative time (.000, .0001, 0002, etc.), then the dt is the value you have for data point 1.
0 Kudos
Message 2 of 8
(3,162 Views)

I am using the read from spreadsheet function.  I was wondering how to specify the time.  In my spreadsheet I have it in milliseconds, but LabVEIW graphs it in seconds.  Thanks

0 Kudos
Message 3 of 8
(3,139 Views)

So if it's milliseconds, divide by 1000. Smiley Wink

If your data looks something like:

0    .435
1    .572
2    .249

and the first column is milliseconds, do like I said with indexing the array and creating a waveform data type. Something like shown below. If you continue to have problems, post your code and an example data file.



Message Edited by Dennis Knutson on 03-11-2008 06:58 PM
0 Kudos
Message 4 of 8
(3,137 Views)

Sorry and please bare with me as I am new to labview.  I tried to re-create your code.  I also have my data formatted with time in milliseconds in one column and the data in the other.  However when I run the code i am not getting any data on the graph.  If you have any tips to help me out with this please let me know.  I include my version of your block diagram. thanks

Download All
0 Kudos
Message 5 of 8
(3,127 Views)
Could you attach a sample data file? If your data is in columns, then don't do the transpose. That would not account for no data appearing in the graph, though. On the output of the Read From Spreadsheet File, right click and select 'Probe'. That will allow you to look and see what the function is returning. also make sure that the data in the file is separated with tabs and not x number of spaces.
0 Kudos
Message 6 of 8
(3,125 Views)
here is a copy of my data file. i have tried switching the columns positons. thanks
0 Kudos
Message 7 of 8
(3,118 Views)

Your data is not like what I gave as an assumption. Your file is comma separated, not tab separated. Your data is in column 1 and the time is in column 3. Your time is in seconds with millisecond resolution - much different than time in milliseconds. Change your code and use column index 0 for the y array and column index 2 for the time array.

This is pretty basic stuff - simple array manipulation, reviewing the input file (i.e. with Notepad), looking at the actual data returned, etc. There are on-line resources for learning LabVIEW at http://www.ni.com/academic/lv_training/how_learn_lv.htm



Message Edited by Dennis Knutson on 03-11-2008 09:48 PM
0 Kudos
Message 8 of 8
(3,115 Views)