06-16-2025 12:10 PM - edited 06-16-2025 12:12 PM
@rolfk wrote:
It is however a but-ugly solution for something that is done 10 times exactly the same! .
More specifically, requiring these clusters at the end still forces us to change the cluster size of array to cluster as well as editing the controls/indicators. I would recommend to keep the outputs as arrays. A cluster with all identical scalar element types is not very scalable and should not be needed.
06-18-2025 07:21 AM
Hello,
After many tests, I found that the part of that VI taking longer is the "DAQmx Read.vi"
Do you know why so ?
Also, the property node doesn't take a single second to get done.
The cleanup also take longer, but only about 50ms more than the first iterations, so that's no big deal.
Here is how I measure time for each step.
If anyone has any idea, I'd love to hear about it
06-18-2025 07:45 AM - edited 06-18-2025 07:46 AM
DAQmx Read returns after:
- an error occured in the driver
- the specified timeout occured (with according timeout error)
- the required amount of samples have been read
Your 2298 ms for DAQmx Read come from the case 3 above. You have a sampling rate and some number of samples to acquire. The samples don't just appear instantously, you did specify a sampling rate after all that your DAQ card tries to faithfully oblige to.
06-18-2025 09:17 AM
@rolfk wrote:
Your 2298 ms for DAQmx Read come from the case 3 above. You have a sampling rate and some number of samples to acquire. The samples don't just appear instantously, you did specify a sampling rate after all that your DAQ card tries to faithfully oblige to.
But in that case the time should not get "longer" as the program runs, but be always slow. I guess I misunderstood the original question. 😄
06-18-2025 09:43 AM
It seems you Create and Destroy the DAQ tasks each iterations, just like with the result file you should create them once outside the loop and reuse them throughout.
06-19-2025 08:59 AM
I'm acquiring data of differnt modules (thermocouples, current, voltage, and digital I/O), do you think I can keep my tasks open and keep acquiring all of them ?
06-19-2025 09:19 AM
06-19-2025 04:24 PM
@altenbach wrote:
@rolfk wrote:
Your 2298 ms for DAQmx Read come from the case 3 above. You have a sampling rate and some number of samples to acquire. The samples don't just appear instantously, you did specify a sampling rate after all that your DAQ card tries to faithfully oblige to.
But in that case the time should not get "longer" as the program runs, but be always slow. I guess I misunderstood the original question. 😄
I, possibly wrongly, assumed this was a different/new problem that had nothing to do with the original problem that was caused by other things than this DAQ Read.