Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to reduce the delay (latency) between acquiring and outputing a signal on the DAQ board?

I am using the PCMCIA slot which is connected to CB-68LP data acquisition board. I want to design a closed loop system in LabVIEW where I can take in the analog input from one of the channels on the board and then modify it according to need, to produce an analog output on the DAQ board again.
 
Right now, I am just using 2 DAQ assistants to acquire and an analog input and output the analog signal. I placed the first assistant in a FOR loop to acquire data continuously. The second assistant is fed from the first one, so it effectively gives me the same output as the input given. However, even this simple process produces a delay of about 4 seconds. My application is a very fast one and it can only tolerate delays of the order of tens of milliseconds.
 
Thus, I wanted to ask if LabVIEW is in fact capable of dealing with such short latencies and if it is, how can i achieve it.
 
Thanks,
Anshul.
0 Kudos
Message 1 of 6
(3,848 Views)

First, the CB-68LP is not a data acquisition card. It is just a dumb terminal block.

When you have a loop, nothing is passed to the next loop until the first loop finishes. You should probably have the DAQ Read and the DAQ Write inside the same loop. You might also want to try using the lower level DAQmx functions instead of the DAQ Assistant. A large part of the time in starting a DAQ write or create is the creation of the task and then the start of it. The DAQ Assistants may be doing both each time they are called. If you were to look at the shipping examples, you would see the continuous read and continuous write tasks inside loops but the create channel and start task functions are outside the loop and only done once.

0 Kudos
Message 2 of 6
(3,826 Views)
Hi,
 
I tried using the shipped examples and one of them is good wnough for my application. The delay it produces is around 2 ms. However, I wanted to know (if possible) wht is the absolute minimum delay that can be achieved between acquring and outputing a signal on the DAQ board.
 
Thanks,
Anshul.
 
0 Kudos
Message 3 of 6
(3,788 Views)
What type of operations are you doing to modify the signal? A hardware solution may be a better approach, if viable.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 6
(3,781 Views)
I am trying to control piano keys with it. I would have displacement coming in through the DAQ card and I would calculate velocity through that and then output it to solenoids which would control the motion of the keys of a digital piano. Actually, i'm trying to mimic the effect of a key press on an old piano to a new digital one.
0 Kudos
Message 5 of 6
(3,778 Views)

Anshul,

I just got done characterizing a program that does something similar with DAQmx.  Got it to run at 1ms on a fairly slow pc.  If you want your vi to be deterministic, you would need to be running in a RT environment. 

Dennis has already told you how to make it run fast.  Avoid the the DAQ assistant and use the lower level DAQ functions to to create and start your input and output tasks outside a while loop.  Put the actual read and write inside the loop.  There are several examples that ship with labview that demonstrate this.

Message Edited by centerbolt on 10-03-2007 09:05 AM

0 Kudos
Message 6 of 6
(3,769 Views)