Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic triggering and aquisition

I am trying to use dynamic pressure transducer data to trigger a compressor. At the same time though I would also like to aquire samples at a lower rate and aquire samples from a thermocouple reader as well. Currently I have an array data reduction inside a while loop that has the triggering inside as well. When I add the thermocouple aquisition to the while loop the whole loop slows down.
0 Kudos
Message 1 of 2
(6,527 Views)
Hello alff,

In LabVIEW, a loop will not complete an iteration and go onto the next iteration until everything within that loop has completed execution.  When a DAQ read function that reads multiple samples is placed within a while loop, that function will not complete until it has acquired the number of samples that you specify.  For example, the DAQmx Read (Single Channel Multiple Samples) function will not finish executing until the number of samples specified in the 'number of samples per channel' input have been acquired by the device.  Therefore, you have a couple options here.  You could reduce with the 'number of samples per channel' to read, so that the DAQmx Read function takes less time to finish and the loop can go to the next iteration faster.  You could also increase the rate of the acquisition, so that those samples are acquired faster and the function finishes faster.  Finally, what I would recommend is to place the code that reads from the thermocouple in a separate while loop so that it is free to execute at a slower rate without slowing down the rest of your code.  LabVIEW will automatically create a separate processor thread to execute the two portions of your code separately.  You can pass data between the two loops using local variables.  I hope this helps and let us know if it solves the problem.

Regards,
Travis G.
Applications Engineering
0 Kudos
Message 2 of 2
(6,505 Views)