LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Diffrence between two data from data aquistion

Solved!
Go to solution

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 Kudos
Message 1 of 13
(3,644 Views)
Solution
Accepted by topic author oly
Try this... (Labview 8.2)
-Matt Bradley

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




0 Kudos
Message 2 of 13
(3,638 Views)

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 Kudos
Message 3 of 13
(3,630 Views)

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 Kudos
Message 4 of 13
(3,611 Views)

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 Kudos
Message 5 of 13
(3,603 Views)

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 Kudos
Message 6 of 13
(3,596 Views)

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 Kudos
Message 7 of 13
(3,594 Views)
Updated program..
Message Edited by oly on 02-24-2009 05:15 PM
0 Kudos
Message 8 of 13
(3,590 Views)
I think I figured it out. The last message is the updated program. Thank you both~~~~~~~~~
0 Kudos
Message 9 of 13
(3,587 Views)

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 Kudos
Message 10 of 13
(3,585 Views)