Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Hardware Timed Delay between AO and AI (PC-6110)

Hello,

 

My experiment requires high-precision (microsecond) delays between AO and AI in order to properly add consecutive signals. I am currently using an external 555 timer to trigger high when AO executes, wait for a specified amount of time, then drop back low. When low, AI is triggered. This allows for control of the delay only limited by the precision of the 555 timer. 

 

Expanding the experiment, I now need to change this delay often and require delays longer than the 555 timer can provide. I would like to trigger AI using the internal clock on the PC-6110, but from what I understand this model does not support HW-timed DIO (not listed as a compatible device on the NI example :Voltage – Hardware-Timed Single Point Input.vi”). 

 

My question is, is there anyway to hardware time this delay using my current card, perhaps utilizing the counter? Any advice is greatly appreciated. 

 

Thanks,

Nick

 

 

0 Kudos
Message 1 of 3
(2,033 Views)

1. Yes, you can generally get excellent timing precision and repeatability with a counter.

 

2. When using NI devices and DAQmx, there's a clear distinction between *triggers* and *sample clocks*.   Many people use the word *trigger* when the behavior they're looking for is best accomplished with a sample clock.

    One key difference: triggers tend to be one-time things, sample clocks can repeat rapidly

 

3. Is this some version of stimulus-response experiment?  I've often advocated for the use of a counter output that acts as a *sample clock* for both the AO and the AI task.  It's pretty easy to configure the AO sample to be generated on the counter's rising edge and the AI sampling to take place on the counter's falling edge.  This gives you excellent control over the delay from stimulus to response, and you can even change the counter's high and low time parameters on-the-fly without stopping any tasks.

   Here's one recent example I posted that you can use as a reference for getting started.   It isn't a complete working example *and* it's meant to solve a different kind of problem.  So don't expect it to work for you as-is.  Many changes will be needed.  But it does at least illustrate some of the config steps needed to use a counter pulse train as a sample clock for AO and AI.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 2 of 3
(1,988 Views)

FYI the 6110 supports hardware-timed DIO, but it doesn't have any DIO sample clocks. There should be some examples on how to do this (look for "correlated IO" or similar terms discussing AO and AI synchronization, it works the same for AI/AO/DI/DO).

 

Basically, you can use the AI, AO, or a counter as the sample clock for the DIO operation. You just have to set up the sample clock manually, as opposed to AIO where you can just say "Make me an analog task with a 10 kHz timer". You'd have to say "Make me a counter task that generates a 10 kHz pulse train, now use that output as the counter source for my DIO task".

0 Kudos
Message 3 of 3
(1,943 Views)