Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling data processing rates for multiple input to one DAQ

I am working with a BNC 2120 breakout module connected to a piezoelectric load cell and a K-type thermocouple.  I have a M Series PCI interface card.  I am trying to log three data points to file at different speeds.  I want to scale, filter, measure the peak to peak, and then record the force data to file.  Also I would like to sample the temperature at a much lower rate and then apply a trend line to indicate the temperature at all points.  Finally I would like to record the filtered force to file for reference.  The difficulty I am having is that the temperature measurement branch operates at a much higher frequency that the other branches.  Is there any way to slow that sample rate down so that all the branches execute at once?  Also, i am trying to use the Curve Fit function on my filtered force data, but the string is only one data point long and so the function generates an error.  Is there any way to include some portions of this code in a loop that will generate a string of signals that can be used in the Curve Fit?

Thank you for any insight.
0 Kudos
Message 1 of 4
(3,140 Views)

Hi,

Yo wrote "The difficulty I am having is that the temperature measurement branch operates at a much higher frequency that the other branches.  Is there any way to slow that sample rate down so that all the branches execute at once?

But with the hardware you are having you cannot sample diferent channels at different sampling rates. Also the program you have written will acquire same number of data points from both the channels at a common sampling rate.

So can you please explain this further so that we can answer your query better?

Regards

Dev

 

0 Kudos
Message 2 of 4
(3,128 Views)
Sorry for the confusion.  Prior to adding the Best Fit to the top branch, the output of this file would be a constant listing of temperature measurements with a Peak to Peak force measurement every 100 lines.  I think that that delay is due to the processing I am doing to the top branch.  I was hoping that the system would wait until there was a force measurement available before writing to file, but it appears that both strings operate quickly and the force measurement returns NaN when a result is not available.  Once I added the Best Fit function, the program no longer runs, it returns an error stating that the array must have more than one element.  I have tried to collect the force measurements and then feed them into the function as a 1 sec. batch but it doesn't work.

Thanks for your help.
0 Kudos
Message 3 of 4
(3,119 Views)
I understand that the data is neccissarily aquired at the same rate since I am using one aquisition device.  What I am trying to do is to slow down the temperature branch to a rate near that of the force data to limit the size of the output file.  Temperature change in the system is on a much longer time scale that force transitions so taking an average of a large number of the temperature data points would be fine.
0 Kudos
Message 4 of 4
(3,118 Views)