Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronized Analog Read and Counter Read gives Error 200141

Solved!
Go to solution

I am currently trying to aquire three channels of accel data (ax,ay,az), 1 channel of Velocity data (vx), and an encoder ctr0 and ctr1 measurements for position data(x). I need to aquire samples at 1000Hz and be able to aquire between 1000-30000 samples.

 

The encoder channels are for direction I have a chip that converts the encoder pulses. When I run my encoder part seperatly as a scope or in a loop stopped by the user, it works.

When I run my analog input seperatly it works.

 

I need to put these together and I have worked up to a point I dont know how to fix.

 

I am using a 6062e Card with a BNC 2120 

 

I have 5 channels of AI

Two channels of Cnt

Pleas help

0 Kudos
Message 1 of 6
(3,858 Views)
Solution
Accepted by topic author mike_fit
Ok I solved the problem, I am using two cards now with a RTSI cable connecting the master and slave.

I would like to find a way to do it with only one card, as it could be useful.
0 Kudos
Message 2 of 6
(3,846 Views)
When you say you are not able to do it with one card what exactly is the issue that is preventing you from doing so.  Are you getting an error when you combine them, is different behaviour occuring then you would expect.  I took your posted sloshtable code and set up a simulated 6251 and was able to run it with no issue.
Doug Farrell
Solutions Marketing - Automotive
National Instruments

National Instruments Automotive Solutions
0 Kudos
Message 3 of 6
(3,830 Views)
I have two seperate vi's that work. One does a analog read, the other does an encoder read.

When I combine them I get an error of 200141 from the encoder channels
0 Kudos
Message 4 of 6
(3,826 Views)

It seems that error 200141 is a buffer overflow error.  The E series cards have a 1 sample FIFO only whereas the M Series that I was using to test has a 2 sample FIFO for counters.  The 6062E also does not have any DMA channels on its transfer so when you get AI calls going in it can hog up your resources and have slower data transfer off the board causing this error.

 

http://digital.ni.com/public.nsf/allkb/E00C0F790CA2CDA686256BF000614DE1?OpenDocument

Doug Farrell
Solutions Marketing - Automotive
National Instruments

National Instruments Automotive Solutions
Message 5 of 6
(3,798 Views)

BTW this also happens if you are attempting to look at frequency and there is noise present in the system.  Had this happen on a USB-6251 doing frequency measurement on an opto-interrupted tach wheel signal.  The device counts the rising edge of noise just like a legitimate counter rising edge and it doesn't take long to fill a buffer.  The warning is to switch to a DMA instead of interrupt but that doesn't matter since its USB and the problem is not that anyways.

 

The solution to this was to add a 270 Ohm Pull up in parallel with a 0.01uF cap to the +5V line sitting on the Open Collector opto-interrupter line coming from the tach wheel.  Noise and overflow gone.

 

 

Brian

Message 6 of 6
(3,769 Views)