LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pci-6251 DAQmx reading VI average time

Hi, all

 I am using PCI-6251   

I 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

Download All
0 Kudos
Message 1 of 2
(2,515 Views)

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,

Ben L
Field Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,475 Views)