LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to increase the control loop rate?

I wish to build a control application that will acquire data from my E series DAQ card and process the collected data using Labview before it is output through the DAQ card again. I understand that the rate that this process occur is known as the control loop rate. However, when I use the usual AI config, AI start, AI read, AO config, AO start and AO write VIs, I could not achieve a rate higher than 100Hz without distorting my output signal. In my data processing, I merely make use of a integration and low pass filter and a few simple functions like addition and multiplication.  I am using a P4 computer with 256kByte of RAM.
 
I have heard people achieving a rate of 4kHz. Is there a mistake with the VIs I have chosen for implementing data collection and output?
 
Many thanks in advance.
0 Kudos
Message 1 of 3
(1,725 Views)
Its hard to answer a speed question like this in a totally generic way.  Can you attach your code so that we can look at it and maybe offer some suggestions to make it more efficient?
0 Kudos
Message 2 of 3
(1,715 Views)
Put these before (outside) the loop: AI config, AI start, AO config, AO start. Put inside the loop: AI Read and AO Write.

The configuration stuff takes time and does not need to be done on each iteratation.

After the loop ends, you may want to set the DAQ devices to a known, safe mode before shtting down. For example you may want to do an AO Write with a value of zero so that some other value is not left at the output while the software is not running.

What rate you can achieve will depend on your hardware, your software, and the operating system. If your external system can become unstable or a danger to persons or property in the event that the AO is not updated promptly, you will need to use a real-time system have external hardware watchdogs, because any desktop operating system may introduce unpredictable delays (while indexing the disk or searching the internet for software upgrades for example).

If you continue to have problems, post a simplified version of your VI with details of your specific problems and someone will probably be able to help.

Lynn
Message 3 of 3
(1,712 Views)