LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronize two DAQmx Read task



@feilong wrote:

Thank jdunham,

   I have a question about the ai/trigger and ai/sampleclock. are they start to output signal (trigger or sampling clock) only when the task starts, even if the real sample clock for that task is always there all the time?


That's my understanding, though it is only based on reading and experience.  It would be great to get opinions from NI employees.  (I also don't have time to scour the manuals today for proof).  
Here's what I believe
The DAQ timing ASIC has specific signals for each DAQ task and those can be routed and shared.  For example AI Start (trigger) AI Sample (all channels) and AI Convert (a single A/D conversion) are all activated by some electrical state change on separate traces somewhere on your DAQ board (in the ASIC).  If you configure RTSI0 as your trigger, then a transition on RTSI0 will cause a transition on those lines when the task is active, but only after passing through a bunch of gates in the ASIC.
So if you export one of those AI signals to RTSI1, then the card is not just going to jumper RTSI0 and RTSI1, but rather it is going to take the signal inside the AI timing logic part of the ASIC and put that out on RTSI1, which as a result of your configuration, may in fact be slaved to RTS0. 

Now I believe that all those internal gates are never going to change state until your task is really active.  In terms of this example, RTSI1 will only start to match RTSI0 after the task starts.  With a decent scope, you should also see a few nanoseconds of gate delays between RTSI0 and RTSI1

The DAQmx configuration VIs may prepare all the logic gates, but presumably they won't be allowed to fire until the task is in a running (started) state. It's hard to imagine they could implement it any other way and not have severe unfixable bugs in the way the cards work.  If they allow you to trigger when the task is not active, then they will also allow other internal processes (like filling up to the DAQ buffer) to start at inappropriate times.

I hope that helps,  and I hope it's right.
Jason

Message Edited by jdunham on 09-26-2007 02:15 PM

Message Edited by jdunham on 09-26-2007 02:16 PM

0 Kudos
Message 11 of 12
(717 Views)

Hi Feilong,

Look at this link and search for “sample clock” Learn 10 Functions in NI-DAQmx, the explanation will be under DAQmx timing.  But let me answer yes the ai/sample clock starts when the task starts. The trigger will wait for a rising or a falling edge after the task starts not before. You can route the ai/sample clock to a PFI line and read it with a scope if you have one. Can you post a picture showing the delay between the devices?

Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 12 of 12
(708 Views)