From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting NAN while reading the data using AIRead

I am using AT-MIO-16E-1 DAQ card for my application.
I am capturing the data by configuring the card for a buffer size as 125000 & scan rate as 250000.Sometimes while reading the data i am geeting the valuse as NAN
0 Kudos
Message 1 of 3
(2,658 Views)
,

I am not at all sure what the source of your problem is. An NaN would results because of erroneous data being read from the buffer. Be sure that your buffer is big enough, and that you are reading it often enough. Look at the examples for information on how to do circular buffering.

High Speed DAQ is a touchy subject. You have to be VERY careful about your configuration. There are delays, timing, and other setting issues that must ALL be taken care of in such applications. I once ran into a problem where I actually had to modify the interchannel delay because my scan speed was high, and my gating setup was such as to cause issues. It is not entirely well documented as to how to set these things (at least not in the VIs themselves.) Be sure to r
ead through your DAQ manual. It also helps to create a timing diagram. Be sure to include any hardware related timing data in your diagram, such as interchannel delays, gate widths (from your channel and scan clocks) etc. Not only will this help you solve your problem, but it will help you gain a much clearer understanding of the limitations of DAQ.

Good luck
0 Kudos
Message 2 of 3
(2,658 Views)
Hello;

At this point I advise you to test your set up with one of Labview shipping examples. The better one to test that is the one named Continuous Acquisition and Chart (buffered).vi; which can be found at Search Examples->I/O Interfaces->Data Acquisition->Analog Input->Continuous Analog Input.
If that works ok with your settings (Scan Rate and Buffer Size), you might want to review your code and make sure the code inside the Read loop is optimized.
Hope this helps.
Filipe
0 Kudos
Message 3 of 3
(2,658 Views)