LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

resample

Hi all,

 

I have a question about resmaple.vi. From the enclosed pic,  Probe 5 is the counter value from cDAQ(so the number should increase). Probe 6 is the resampled signal. From the watch window, the data from probe 6 is less than the data in probe 5 which mean the data in probe 6 is previous than probe 5. Why does this happen?

 

Thank you and have a nice day!

8.2.png

0 Kudos
Message 1 of 6
(2,766 Views)

Hi Ivy,

 

I'm a bit unclear on the code in your application from simply consulting the picture you provided.  There are a couple of examples on resampling available in the Labview Example Finder within Labview they may be able to help.  They can be found by searching for "resample".  Also which resampling VI is it that is being used in your code?  Would you mind uploading this portion of your code so that I may take a closer look at it?

Justin D
Applications Engineer
National Instruments
http://www.ni.com/support/
0 Kudos
Message 2 of 6
(2,731 Views)

Thank you, Justin,

 

I use constant to constant resample.

0 Kudos
Message 3 of 6
(2,713 Views)

Hey Ivy,

 

In looking at the picture of your code the a dt of 200 in your sampling VI seems high.  If you could upload this portion of your code or post a picture of a graph of your signal before resampling then after resampling it would be extremely helpful.  Also if you want your resampled signal to span the same time domain as before resampling then you must use zero padding.  There is an example of how to easily zero pad a signal in the Labview Example Finder.

Justin D
Applications Engineer
National Instruments
http://www.ni.com/support/
0 Kudos
Message 4 of 6
(2,704 Views)

Thank you , I will try the zero padding.

 

In the help document:

 

"X contains the input signal for resampling. the sampling intercal of X is 1"

 

"dt specifies the sampling interval for Y"

 

dt=200: resample every 200 samples.

 

If the sampling rate of X is 10kHz, the sampling rate of Y is 50Hz.

 

 

0 Kudos
Message 5 of 6
(2,694 Views)

Sounds good Ivy.  Let me know the results of the zero padding and then we can go from there.  Your calculations look correct to me and should in fact provide 50Hz sampling.

Justin D
Applications Engineer
National Instruments
http://www.ni.com/support/
0 Kudos
Message 6 of 6
(2,690 Views)