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