02-24-2009 02:19 PM
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.
Solved! Go to Solution.
02-24-2009 02:44 PM
02-24-2009 02:58 PM - edited 02-24-2009 03:02 PM
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~~~~~~~~~~~~~~~~~~~~
02-24-2009 03:36 PM
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.
02-24-2009 04:18 PM
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.
02-24-2009 04:49 PM
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.
02-24-2009 04:59 PM
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.
02-24-2009 05:08 PM - edited 02-24-2009 05:15 PM
02-24-2009 05:19 PM
02-24-2009 05:25 PM
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!