Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Latency between two DAQmxWriteDigitalU32 calls

Hi everybody, 

 

It is the first time that I use a NI board, I have a NI PXI 6259.

I want to generate two signal Sig1 and Sig2 which could be controlled independently : I want SigS1 = 1, SigS2 = 0 and inverse these values to have SigS1=0 and SigS2 = 1.

I have created 2 task : taskSigS1 and taskSigS2 with (DAQmxCreateTask) and two chan with (DAQmxCreateDOChan).

 

What I noticed, is between two call of DAQmxWriteDigitalU32 : one to set SigS1 to 0 and the second to set SigS2 to 1, I have a latency period of about 1 or 2 ms.

 

Trying avoid that, I kept only one task for the two sig : I can inverse SigS1 and SigS2 at the same time.

 

My need is to control this latency : i want in some case add a latency period between SigS1 and SigS2 and control this latency period : for example 0.01 ms from the falling edge of S1 and the rising edge of S2.

 

Do you have any idea or advice on this ?

 

Thank you very much for your answers

0 Kudos
Message 1 of 4
(2,722 Views)

Hi,

 

Thank you for posting on the NI Forum. I have found a similar post concerning the slow communication for the DAQmxWriteAnalogF64 function.

 

Here is as well some reading to understand about the performance of NI-DAQmx functions (Refer to "How does a state machine help improve the performance of NI-DAQmx?").

Thanks,

0 Kudos
Message 2 of 4
(2,685 Views)

Hi, 

 

Thank you very much for your answer. I'm going to have a look on this topic.

 

 

0 Kudos
Message 3 of 4
(2,681 Views)

If you need a precise and controlled latency time between edges, you'll need to use a hardware-timed task on the board.  You won't be able to do it in software.

 

It's possible to control timing either with buffered Digital Output tasks or with Counter pulse generation tasks.  Hard to say which is more appropriate for your situation without more details.  It's also possible you want a degree of control that even hardware-timed tasks on your board won't be able to manage.

 

Key questions: once this precise latency time is defined, under what circumstances will it need to be changed to a different precise value?  How often might that occur?  Is it ok to miss some incoming reference edges while reconfiguring?

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 4
(2,672 Views)