LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ADC conversion attempted before the prior conversion was complete.

Hi,

 

I am using a NI 9219 module in a cDAQ 9171. I've been running my code for some time and all of a sudden I am now receiving the error "ADC conversion attempted before the prior conversion was complete.". Why is this? How do I fix this? I've read a bunch of forums on it, including the NI help for the error and all attempts to remedy the issue don't seem to work.

 

I am using continuous sample acquisition with a rate of 1Hz. My samples to read is 5. So sampling rate is 5 S/s?

 

Any help is appreciated,

 

Cheers,

Duncan

0 Kudos
Message 1 of 5
(3,211 Views)

If the samples to read that you're talking about is the value connected to the top of DAQmx Timing, then no - this controls the buffer size when you wire the "Continuous Samples" option. The Detailed Help (available via right-click > Help or via Context Help then "Detailed help" at the bottom (use Ctrl-H to open/close context help)) can give you some additional text describing the inputs to the Timing function.

 

If you mean the samples to read connected to DAQmx Read, then that is the number of samples that will be output by the function (assuming no timeout). In that case, the node will take ~5s to finish, because it tries to read 5 samples and only gets 1/s.

 

What did you change that caused the error to begin appearing (I know that if you knew the answer to this exactly, you'd have no problem fixing it, but it's worth thinking about and trying to describe - maybe we can take a guess based on your description).


GCentral
0 Kudos
Message 2 of 5
(3,167 Views)

I see. Yeah, I mean the samples to read connected to DAQmx Read (and yes, I have it set to no timeout).

 

I didn't change anything, which is why I don't understand why this all of a sudden happening. I cleared my connections on MAX and I'm still receiving the same error. The only thing I am running differently with my tests now is that I also have an external camera hooked up to one of the USB ports on my laptop and am recording a video using VideoVelocity. I don't see how/why this would affect the functioning of my DAQ or LabVIEW code however. I tried running the code without the camera and I am still receiving the same error.

 

Cheers!

0 Kudos
Message 3 of 5
(3,150 Views)

I took a look at the NI 9219 Datasheet and it tells me that the module has 4 timing modes: High Resolution, Best {50,60} Hz rejection and High Speed.

 

I'm guessing that you're using the High Resolution mode - if so, can you try with perhaps one of the "Best ... Hz" modes (probably choose whichever frequency is the power line in your country/building 🙂 ) to see if that will help?

 

It certainly looks like the High Res mode should be fine at 1Hz, but confirming that it's a timing problem in the module would be a good start, I guess. Assuming that the problem disappears with a different mode, we can try and work out why it's having a problem with 1S/s/ch (how many channels are you using, by the way?) in High Res.

 

If you can upload the VI you're using to make the measurements, that might also be helpful. Failing that, the block diagram as an image or snippet (preference for the snippet!) would be a reasonable second place.


GCentral
0 Kudos
Message 4 of 5
(3,143 Views)

Hi,

 

Sorry for the late reply here. Yes, I am using high resolution with all 4 channels active. I just tried re-running my code and I am no longer seeing that error. Could it be that when I let it run for an extended period of time (on the order of hours), that the problem can arise? Or is it something that would arise from the get go? I haven't changed anything, so I don't know why it now doesn't appear. Although, I also hadn't changed anything originally when it started appearing.

 

As suggested, I changed the ADC timing mode to Best 60 Hz rejection, which also seems to running fine at the moment.

 

I have attached my VI.

 

Cheers!

0 Kudos
Message 5 of 5
(3,105 Views)