取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 6 条)
3,611 次查看

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 项奖励
2 条消息(共 6 条)
3,576 次查看

Thank you, Justin,

 

I use constant to constant resample.

0 项奖励
3 条消息(共 6 条)
3,558 次查看

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 项奖励
4 条消息(共 6 条)
3,549 次查看

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 项奖励
5 条消息(共 6 条)
3,539 次查看

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 项奖励
6 条消息(共 6 条)
3,535 次查看