LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200019, ADC conversion

Solved!
Go to solution

I have a project were I'm reading multiple AI Channels from sensors of the engine test  bench, I've set up DAQmx Timing and connected it to my encoder pulse which has a pulse every 0.1 degrees. When I run the engine at speeds <1500rpm the program runs fine but when i increase it to >2300rpm i receive this error. I have attached my VI to the query. I am using a NI USB 6351.

0 Kudos
Message 1 of 6
(158 Views)

What error did you receive? There isn't any image attached.

Error -200019 occurred at an unidentified location

Possible reason(s):

ADC conversion attempted before the prior conversion was complete.
Increase the period between ADC conversions. If you are using an external clock, check your signal for the presence of noise or glitches.

 

You are using the encoder signal as the sample clock source. How many pulses are generated per rev from your encoder?

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 6
(131 Views)
Solution
Accepted by topic author sous

What happens if you change the estimated sample rate you wire into DAQmx Timing?  Try something more like 150-160 kHz.  Here's two possible reasons why:

 

1. Your posted code declares 200k samples/chan/sec.  With 6 channels in your task, that's an *aggregate* rate of 1.2 MHz.  Your 6351 is only spec'ed for 1.0 MHz aggregate in multi-channel tasks.  So you're asking the device to set up its multiplexing clock to do something it isn't spec'ed to handle -- fit 6 channels worth of ADC conversions within a 5 usec interval.  You're trying to convert the next channel before the previous one has had enough time to fully settle, according to the device specs.  This alone might be the cause of the error.

    With 6 channels, the "perfect world" max sample rate would be 166.66666 kHz to meet the 1 MHz aggregate max.  There needs to be just a little leeway in there, so try declaring slightly less like 150-160 kHz.  Then the multiplexing clock can be set up for a rate that the device supports.  However, doing so will make you more prone to the 2nd possible error cause below.

 

2.  Your *actual* sample rate where the problem occurs is something greater than (3600 samples/chan/rev) * (2300 rev/min) * (1 min / 60 sec) = 138k samples/chan/sec.

    I haven't personally tested engines but have been in discussions about such tests.  By my recollection, there's quite a bit of speed variation within an engine cycle, maybe at least +/- 25% from the nominal?   Well here, speed variation directly maps to sample rate variation.  So a 25% variation on a nominal of ~138 kHz might easily give you sample rates that vary through 100-175 kHz range.

    If you *do* get up to that 175 kHz range, you'll be stuck one way or another.  You can't declare such a fast sample rate or you'll violate the 1.0 MHz aggregate rate for 6 channels.  But if you declare a slower rate, the multiplexing clock will be set slower and all 6 channels won't yet have converted before the next encoder edge tries to start a new set of 6 conversions.

 

Summary: you're probably pushing too hard against your hardware limits.  I think I'd focus this 100+ kHz sampling to the (likely) more dynamic torque and pressure phenomena.  With only 3 channels to support, you give yourself a lot more safety margin for your clock rates vs. device specs.  Then you can use a 2nd DAQ device to capture the 3 thermocouples at a lower rate, perhaps using a 1-per-rev signal as a sample clock.  (You'll also need to sync their task starts with a trigger so you know both data streams start on the same engine cycle.)

 

 

-Kevin P

 

 

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 3 of 6
(107 Views)

The encoder has 3600 pulse per rev.

0 Kudos
Message 4 of 6
(99 Views)

I want to be able to run the engine at 3000rpm, this in return would create 180000 samples/s/channel. I want to be able to at least have In-cylinder pressure and Torque and I need the Differential inlet pressure for volumetric flow rate equation. This means i need to sample 540000samples/s but that does not fall within the 1Ms/s threshold, what do you suggest I do?

0 Kudos
Message 5 of 6
(93 Views)

Hi sous,

 


@sous wrote:

 what do you suggest I do?


Read your 3 channels - instead of 6 channels...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(87 Views)