04-13-2010 09:31 AM
Hi, all
I am using PCI-6251I have attached a VI and its profile data, I don’t really understand—the average time of DAQmx Read (Raw 1D I16).vi is 175.5ms, but the longest is 984.4ms, why the difference is so big? is there a way to reduce the difference?
Thanks
Lyn
04-19-2010 06:50 AM
Hi Lyn,
I have taken a look over the code, there are various VI's that could be running at the same time as the DAQmx Read that your processor may be switching between (e.g. “Divide Data.vi”, “array max and min”). Have you considered implementing a producer consumer architecture? This would allow you to read the data off your DAQ card into a queue and process and/or save the data in another loop.
In addition you are opening and closing your file with every iteration of the loop which will not help the performance of your VI. I would suggest take the “TDMS Open” and “TDMS Close” VI’s out of the loop.
Best of luck with your application.
Kind regards,