Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

error -200714 related to shared variables?

I was receiving error -200714 "driver not able to transfer data from device to computer memory fast enough"  while trying to run my labview 8 code on a PC target.  The error was generated on a daqmx AI read VI.  It seems like this error would have to do with the sampling rate, however reducing this to a small number didn't help.

To get the error to go away I had to reduce the number of shared variables I use.  I have about 15 total and two are arrays 1086 x 1.   So if I delete one of the 1086 X 1 arrays the error goes away.  I have the variable split into 3 librarys and the two large arrays are hosted by the SVE on the Target.  Can anyone explain what is happening?  Have a reached the limit of the SVE?
0 Kudos
Message 1 of 5
(4,007 Views)
Hello chillywilly2,

Can you give some further description of your application?  In particular, please address the following questions:

1.  What is you hardware setup?  This includes which DAQ board are you using and any real-time targets.
2.  What are the shared varaibles in your application doing?
3.  What sample rates have you tried?
4.  How many channels are you reading data from? 

This information should help us to narrow down the issue.

Best regards,
0 Kudos
Message 2 of 5
(3,996 Views)
The error regards the data coming from the DAQmx hardware through the DMA channel to the RAM of the controller. You may try looking at the Real-Time System Manager to see how much RAM usage you are at. Maybe if it is at a high percentage, your DAQ board is unable to allocate a large enough buffer to put its data into RAM.

Jarrod is on the right track, I'm just trying to add more information to clarify the issue.

Richard

Field Sales Engineer, New Jersey
National Instruments
0 Kudos
Message 3 of 5
(3,992 Views)
Thanks for the responses Jarrod and Richard

1.  What is you hardware setup? 
2 x M series, PCI 6221
1 x counter timer board PCI 6602
These three board reside in a desktop PC real-time target

2.  What are the shared variables in your application doing?
There is a VI on the Target that has three loops:
- Loop 1 contains 6 analog inputs, which are hardware triggered.  The speed of acquisition depends on the speed of an engine since a crankshaft encoder triggers the acquisition of each set of 6 samples.  This loop acquires data from PCI 6221 #1.  The max rate is 129,600 S/s for all 6 channels.
- Loop 2 uses a counter/timer to measure the period of the crankshaft encoder signal, and the speed of this loop also depends on the engine speed.  This is done using a counter timer on PCI 6221 #1.
- Loop 3 takes care of feedback control of 6 electric motors.  plus acquires two other channels.  So there are 8 analog inputs from PCI 6221 #2, which are acquired together as single samples at a rate of 400 Hz so 3200 S/s for all 8 channels.  This signal is then passed to a PID controller which outputs 6 signals to create PWM signals through the counter timers on the PCI 6602.

Basically the process being measure by Loop 1 is controlled by Loop 3, so the output from Loop 1 is used as the process variable in a PID in Loop3.  Shared variables are used to pass the output from Loop1 to Loop 3.  Additionally, information is passed to a host VI from all three loops and to other VIs running on the Target.  And parameters are passed from the host to the Target VIs such as PID parameters, whether to switch the PID from manual to automatic....

I receive error -200714 from the DAQmx read vi within loop 3 and sometimes I receive error -200279 "attempted to read samples that are no longer there" from the DAQmx read vi within loop 1.  When these errors occur using the Real-Time System Manager I can see that only 10% of the Target's RAM is being used, however 100% of the CPU is being used!  When I shuffle the shared variables around the errors go away.  If I host too many shared variables on the Host the errors occur, but then when I place some of them on the Target everything is fine.

Thanks,
Nick
0 Kudos
Message 4 of 5
(3,980 Views)
Hello Nick,

It sounds like you may be trying to push the envelope of what this system can do.  The error -200714 is due to the fact that the computer cannot stream data from the DAQ board's FIFO to the computer memory fast enough.  This makes me wonder if somehow you are configuring and running more than 6 tasks on your 6221.  If so, the extra tasks would have to use interrups as the data transfer mechanism since there are only 6 available DMA channels for use by the board.  Interrupts are a much slower transfer mechanism than DMA channels. 

The thing that I would suggest to try to overcome this limitation would be to use data compression.  The NI-DAQmx driver supports two types of compression, lossy and lossless.  For more information on these types of compression and how to use them, please refer to NI-DAQmx Professional Tools.

The second error you are getting, -200279, is due to the fact that your program is not reading the data out of the PC buffer fast enough to keep up with the acquisition.  This error is much more common than the first.  For more information on this error, and tips on how to work around it, please refer to (DAQmx) Error -200279 During a Continuous, Buffered Acquisition

I hope this information helps.  Let me know if you have any questions after trying the suggestions I've given.

Best regards,
0 Kudos
Message 5 of 5
(3,965 Views)