03-02-2012 03:58 PM
I am trying to get the x-scale to start at 00:00:00 when I hit the start button. Then just act as a time scale in minutes and seconds correlating to my data that is being collected. so say i collect data for 15 minutes and 30 seconds the final point would be 00:15:30.
now in order for me to get the data in this format I need to correct everything in excel. for example if i collect data starting at noon on the nose and collect data for the 15 min and 30 sec, I have the actual time that each data point was collected and need to subtract the initial time that started at to give me the time to correlate peaks to a certain time into the measurement.
03-02-2012 04:05 PM
An update after looking your VI.
Note that my solution uses a sampling period of 1 second. The defualt spacing between points in the chart is 1. Thus in my example every sample (taken each second) is plotted in the correspondent number 1,2,3, etc.
To understand this, change the sampling time to two seconds. Note that every two seconds a point will be plotted in the x axis (1, 2, 3 and not what one would like 1, 3, 5).
To adjust this you must set the multiplier (from offset and multiplier) to adapt to your sampling freq.
03-02-2012 04:18 PM
So the solution will be something like this
Please note that if you sample at high frequency during 15 minutes, the number of points will exceed the default chart memory of 1024 points.
03-02-2012 04:19 PM
03-02-2012 04:26 PM
Is the property node INSIDE the loop or OUTSIDE the loop? If it is inside, then at every iteration you are setting the starting point at zero preventing the proper update.
03-02-2012 04:28 PM
03-02-2012 04:30 PM
Please send the latest version of your VI
03-05-2012 08:30 AM
sorry we had a bad snow storm here in milwaukee on friday. I had to get out quick or I would have been stuck in traffic for hours.
03-06-2012 02:55 AM
Hi. Sorry for the late response
Your problem lies in that you are ploting a "waveform" data type and not an array. A waveform contains the array of data AND time information of the data, this is: A timestamp marking the start of the acquistion (t0) and the time interval between samples (dt).
More info here: http://digital.ni.com/public.nsf/allkb/B965F316364DE17B862572DF00363B10
This time information is passed to the chart and therefore overwrites the customization of the time scale.
To correct this, change the polymorphic DaqMx Read instance to output the data as a 2D array. Be carefult to transpose properly the 2D array before ploting the multiple signals. Also you may "unbundle" the components of a waveform, usign a special function called "Get waveform components".
I must say that the waveform option is quite handy since the time stamp is bundled together with the data, so there is no risk to forget when you acquired the data. If the problem how the time information is being read in excel, then you should not try to remove the time stamp info but format it in a way that the written text file (or .xls) can be interpreted by excel.
So, long story short: The chart can be left as it is (with the timestamp). For the written file, you do in LabvIEW what you are currently doing in excel: take the time stamp of the first point and substract it from the others. Then format the resulting time using "Format data/time into string" in the more convenient way to you.
Regards
03-06-2012 07:15 PM
I have tried both the unbundle by name and get waveform components and neither of them worked. The line was broken due to the it was a 1d array of waveform data.
I even then went as for to turn the waveform data into a cluster by using the array to cluster and then getting the wave form components. I was able to separtate the three components out. at this point my goal was to subtract the time at which the measurement started from the running time that the data was giving me. This was somewhat successful, however I am not able to build the waveform with those new values.
This is what I do manually in excel so i know there is a way to do it in labiew. Im just not sure of all the tools available to me in labview so I am sure that I am overlooking something.