12-06-2013 10:38 AM
Dear all,
I am writing a program (in labview version 9.0) to acquire signal from a fast photomultiplier. I am using the acqusition rate of 1.25 Ms with an external trigger. Now what i need is to add the data from 'n' such acqisitions and then process further. For example if I am acqiring the signal for 200µs then total number of data points with the the acqusition rate of 1.25Ms will be 250. I will get a 1D array of 250 data points each time I run my acquisition.
Lets say Array 1from acquisition number 1, 0.1, 0.3, 0.5, 0.6 , ........... up to a total 250 data points
Array 2 from acquisition number 2, 0.4, 0.5, 0.8, 0.4, ............ up to a total 250 data points
----------------------------------------------------------------------------------
Added array should be, 0.5, 0.8, 1.3, 1.0, ...............up to a total 250 data points
-----------------------------------------------------------------------------------
To do this I need to first save the array from acqisition number 1, then run the acquistion no. 2 and add the corresponding data points to the saved array. This should be continued to a user defined nuber of acqusition say 10, 20 or 50.... I don't know how to do it. Can any one help me out in this problem?.
Thank you very much in advance
With best regards
Chaithanya
Solved! Go to Solution.
12-09-2013 10:43 AM
Dear All,
I have succeded in writing the program to do what I have mentioned in my above post. However I have a new problem now, the program slows down when I run it for long. This program has been written to run a cavity ring-down spectrometer. The signal I am acquiring has an exponential decay and I need to get the life time of the signal by fitting it after the acquisition. What I do is I will set the number of acquisitions to average and then I take the averaged data to fit with an exponential fit. Before going for the exponential fit I do a rough guess with first 15 data points to have an idea about the total fit length. This works fine but the program slows down after few seconds of run. I suppose the probelm is in handling the huge data set. I have a PCI-6251 acqusition card with the sampling rate 1.25Ms/s. can some one has a smarter way to do the same?. I have attached my code with this post.
Any suggestions are greatly appreciated.
Thanks in advance.
Chaithanya
12-11-2013 03:27 AM
I asume that avarages and acquisition time will not change during a measurement, so keep that outside the the loops. If you know your parameters for the fit make them constants.
one create task (outside the loops) and one close task at the end.
Avoid the build array where possible. With no. av. and no. of acq.points declaired, the size of the arrays is fixed and you can (re)use one array and the replace array elements.
No need to collect all data and avarage them after collecting. just add
I add a suggestion 😉
12-11-2013 03:31 AM
and backsaved for 2009
12-11-2013 07:37 AM
Dear Henrik,
Thank you very much. You help is really appreciated. I am very new to labview and hence not very efficient in programming. I am learning by mistakes any way. That was really helpful.
Thanks again
Chaithanya