LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Digital Trigger Sources for Synchronized AI, AO and External Digital Events

Hey guys, LabView noob here,

 

I need to accurately trigger and read out some analog input and output data. My application: I'm designing an experiment which presents a sound and event signal (@ 400+kHz) through two analog output channels then waits for some response to that sound through two digital input lines (each indicates a different response). I would like to synchronously record the AI, AO, and DI signals.

 

So far, I've been able to synchronize the analog inputs and outputs by using an internally generated digital trigger to start both processes. My problem is getting to the next step, receiving a response trigger through an external digital line(s), and using that signal to trigger analog input read.

 

So, the order of events:

START TRIGGER (internal digital) --> SYNCHED AI/AO/DI START (sound plays, start acquiring AI/DI samples) --> VARIABLE RESPONSE TIME --> RESPONSE TRIGGER (external digital) --> ANALOG INPUT READ (read all samples from start trigger to response trigger).

 

I would also like to have accurate timestamps for these events (AO onset, response time; within 10ms accuracy). For the external digital input, I could wire both lines to a single line to get a single trigger, but I also need to be able to tell where the trigger was received from (line 1 or line 2), hence the need for digital input synchronous with everything else. For this, I don't necessarily need continuous monitoring, but at least the state of the digital channels at the time of the trigger.

 

Is what I'm attempting to do even possible with my hardware, it seems like a tall order? If so, I could use some help implementing it... or if there are better ways of doing this, I am open to anything!

 

I'm using a PCIe-6363 DAQ card with LabView 2014 on Windows 7. See attached .vi. Thanks in advance!

 

 

Message 1 of 4
(3,420 Views)

Hello angelonc

 

I found a couple of documents that maybe you can check. 

 

http://digital.ni.com/public.nsf/allkb/EBD603683446EC13862575B3006A63A2 

https://www.ni.com/en/support/documentation/supplemental/06/timing-and-synchronization-features-of-n...

 

These can give you a quick information about the topic.

 

Warm Regards,

Sigi

"everything is achieveable through technology'
0 Kudos
Message 2 of 4
(3,325 Views)

Thanks for your reply, I have looked at these examples before and I am able to synchronize AI and AO. I would suspect that adding DI to this would not be too difficult.

 

The larger problems I am having are the following:

- getting accurate event timestamps (I am not even sure how to do this... I suspect using a counter, but I am unsure of how to get a timestamp output from a counter)

- I have multiple triggers that I want to perform different actions with (ie. I have an internal digital trigger that I want to start all my acquisitions and outputs, but I have an external trigger that I want to stop all my acquisitions and outputs)

 

So far, the only Labview functions I have seen that get timestamps are OS dependent, and I was wondering if there is a way to get the hardware clock time from the DAQ card.

 

Additionally, can I use different trigger sources to start and stop my acquisitions?

 

Thanks.

Message 3 of 4
(3,293 Views)

Hi,

 

Also a noob here, but I tell you what I do in my experiment in case it helps. I have a NI cDAQ 9184 with modules to perform AO, AI, DO, DI. How I synchronize AO and DI is to operate two VI's. LetsL call it "VI that reads" and "VI that writes". Procedure: I run the VI that reads two DI, the trigger channel and the signal channel, continuously using a while loop, then I do if loop: if I read something >0 from the AI Trigger that reads the VI that writes, then proceed to read the data from the DI signal. I hope it helps.

Regards,

Roman

I .the trigger channel, I begin to a

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