07-15-2009 07:31 AM
Hi , I am using usb 6259
The output of a analog signal from a read task is in waveform . I need to do a running average of the 1000 samples . So took the array and converted the waveform into array and averaged it and again converted back to waveform. But now the x axis of the converted waveform is number of samples where as the x axis of the earlier waveform is time which is just .06sec.
So how can the x axis be changed from number of samples to time.
regards
AVINASH
07-15-2009 08:55 AM
07-15-2009 10:00 AM
Hi
Actually data is read in the form of waveform which had time as x axis . It was converted from waveform array into normal array using "get waveform component"in waveform module . Then this array of 1000 samples is processed to get a running average with every 10 elements averaged. Now there is a averaged array has 1000 samples . To convert this array into waveform "Build waveform" was used and waveform array is built. Now this waveform has x axis as ranging 0 to 1000 , where as earlier waveform had time as its x axis .
So is there a way to convert the x axis from number of samples to time axis .
regards
AVINASH
07-15-2009 10:54 AM
07-16-2009 12:32 AM
If i dont ignore the time stamp check, the x axis will be in absolute time . If time stamp is ignored the x axis is in number of samples ranging from 0 to 1000 . I need the x axis to start from 0 second.
07-16-2009 09:17 AM
07-17-2009 04:15 AM
That i did earlier only. But the relative time is in the format HH:MM:SS . But the wavefrom from the read is just 0.01 sec. The whole waveform finished in 0.01 sec.
So is there any other solution ?
regards
AVINASH
07-17-2009 08:38 AM
07-17-2009 09:16 AM
ok . I did change . But still the original waveform is in milli sec and processed waveform is showing in minutes. I have attached the part of the program . Can i get the processed waveform in milli sec only .
regards
AVINASH
07-17-2009 10:03 AM
You should have posted your code at the very beginning. You are not doing the conversion from/to waveform correctly. You are not getting the the dt and t0 from the original and using it the new waveform. You should just wire the original waveform into the waveform input of the processed waveform.