06-29-2015 02:31 PM - edited 06-29-2015 02:35 PM
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!
06-30-2015
02:46 PM
- last edited on
12-17-2024
06:44 PM
by
Content Cleaner
Hello angelonc
I found a couple of documents that maybe you can check.
http://digital.ni.com/public.nsf/allkb/EBD603683446EC13862575B3006A63A2
These can give you a quick information about the topic.
Warm Regards,
Sigi
07-02-2015 09:08 AM
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.
04-13-2018 02:49 AM
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