Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Conversion in waveform chart x axis form samples to time

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

 

0 Kudos
Message 1 of 10
(4,598 Views)
Do you have the Ignore Timestamps checked? What do you have the x formatting set to?
0 Kudos
Message 2 of 10
(4,591 Views)

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 

0 Kudos
Message 3 of 10
(4,586 Views)
Yes, and I would suggest you answer my questions about your graph. Displaying time on the x axis is a matter of configuring it correctly and since you did not post any code, I don't know how you have it configured and that is why I asked the questions. If you don't know the answers, then you probably did not configure the graph at all and you should right click on the graph and change the properties. The first option is immediately visible when you right click.
0 Kudos
Message 4 of 10
(4,584 Views)

 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. 

 

 

0 Kudos
Message 5 of 10
(4,560 Views)
Then change X Scale>Formatting to relative time. 
0 Kudos
Message 6 of 10
(4,553 Views)

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

 

0 Kudos
Message 7 of 10
(4,542 Views)

Change it.

 

 

time resolution.PNG

 

Learn LabVIEW

0 Kudos
Message 8 of 10
(4,535 Views)

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

0 Kudos
Message 9 of 10
(4,527 Views)

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.

 

Create Waveform.PNG

0 Kudos
Message 10 of 10
(4,523 Views)