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

Diffrence between two data from data aquistion

已解决!
转到解答

Hi,

 

I got a data aquistion system which is supposed to keep aquiring data unitl the difference between two points reached some big number. For example, I am getting voltage(mv) like 2.31, 2.32, 2.34. 2.33, 2.32, 2.32, 2.33......Until the data reach some point, let's say 0.1V higher or lower than the first one.Thewhole procss stop. Thank you for any suggestions.

0 项奖励
1 条消息(共 13 条)
4,199 次查看
解答
已被主题作者 oly 接受
Try this... (Labview 8.2)
-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 项奖励
2 条消息(共 13 条)
4,193 次查看

Hi Matt,

 

Thank you for your help. However, I do not the Max until I actually run the program. For example, the data I got is 10% bigger than the first one, then the aquistion stops. :(...However, I do know the first one until I run the program.

 

Em..I kindof see your point. Thank you. Let me work on it...Thank you~~~~~~~~~~~~~~~~~~~~

Message Edited by oly on 02-24-2009 03:02 PM
0 项奖励
3 条消息(共 13 条)
4,185 次查看

Hi Matt,

 

I understood the program now. One more question is I do not know my initial value until I run the DAQ system. The first data I aquired should be my initial value which has a wild range actually, 0-600mv. However, I max difference I want is around 10mv. Any idea how to set the initial value. Can I somehow run my DAQ several times and then get mean of them and then set it as the initial value?Thanks.

0 项奖励
4 条消息(共 13 条)
4,166 次查看

It looks to me like Matt's example took care of that.  The first (0th) iteration of the loop can't stop while while loop because he requires the condtion and the i terminal to be greater than zero in order to stop the loop.  This gives the loop an opportunity to seed the shift register.

 

Post your code if your having problems.

 

If you want to get a handful of values and average them to get the initial value, I would just do another DAQ read in a loop of let's say 10 times and feed the average to the left hand shift register to initialize it.

0 项奖励
5 条消息(共 13 条)
4,158 次查看

Hi Ravens,

 

Thanks for your explanation. You and Matt are right. Here is my program.

Couple questions came up. The amplitude I got from the DAQ is dynamic data.

1. Any way to record them and then manage them real time? Is it possilble that we store them in an array or something as Amp(1),Amp(2), Amp(3)..,...Amp(i)?

 

2. I failed to wire "amilitude" to the wait loop and replace "get data"...I know the data types are different.How can I change the data type of "amplitude"?  

 

Thank you for your explanation again.

 

 

 

 

 

 

0 项奖励
6 条消息(共 13 条)
4,151 次查看

I cleared out the seconde question.  I used the dynamic data type converter and change to it DBL. I finally connected this two together. 😞

 

Thanks.

0 项奖励
7 条消息(共 13 条)
4,149 次查看
Updated program..
Message Edited by oly on 02-24-2009 05:15 PM
0 项奖励
8 条消息(共 13 条)
4,145 次查看
I think I figured it out. The last message is the updated program. Thank you both~~~~~~~~~
0 项奖励
9 条消息(共 13 条)
4,142 次查看

Hi,

 

I am still curious about this one, 

 

The amplitude I got from the DAQ is dynamic data.

1. Any way to record them and then manage them real time? Is it possilble that we store them in an array or something as Amp(1),Amp(2), Amp(3)..,...Amp(i)?

 

Any idea? Thanks!

 

0 项奖励
10 条消息(共 13 条)
4,140 次查看