Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

fMRI paradigms & response logging

Dear readers,

Does someone have experience with creating fMRI paradigms with LabVIEW?

Our setup and goal are actually quite simple:

Setup:
- Trigger_in (TTL) going to DAQ-card (m-series USB-6251)
- Trigger_out (TTL)
- 4 digital lines coming from response buttons
- Laptop running LabVIEW 8.5

Goal:
With the LabVIEW program we want to have a controllable delay ranging from 0 ms to 3000 ms with an accuracy of ... 1 ms if possible, between the moment Trigger_in is received and Trigger_out is produced.
The response coming from the buttons has to be logged constantly with an absolute timing (starting from the first trigger_in).
Finally we want to present visual stimulations (pictures) at certain time points, with a duration also as accurate as possible (1 ms?)

I'm just checking if people have experience with a setup like this and if they can help me started or explain some of the difficulties they came across on the way.

Thanks in advance!

Tom Broux

0 Kudos
Message 1 of 6
(3,868 Views)
I am currently working on two similar projects.  If you have any specific questions I will be happy to help.  My email is in my Profile.



Randall Pursley
0 Kudos
Message 2 of 6
(3,861 Views)
For the button presses, I had to build up some external circuitry to OR all the inputs together to use as a trigger for a Read (PFI0).  In my case, I was using a card that did not support correlated DIO so I had to use my analog inputs for the button pushes.  I set up my DAQmx Read to be a triggered Read and I start the task.  I then wait for a trigger and read the data when one occurs.

Attached is an example.  You might need to check the DAQmx stuff to make sure it matches your configuration.  This is in 8.5
Randall Pursley
Download All
0 Kudos
Message 3 of 6
(3,853 Views)
As for the Trigger out signal, take a look in the examples of a DAQmx/Counter/Generate Pulse.llb/Gen Dig Pulse-Retriggerable.vi

This one will generate a pulse of defined size in pin CTR0 when it receives a trigger pulse after a predefined delay.

You could use the same PFI0 input as your trigger source and just set the initial delay to the desired size (in counts, it looks like the 100kHz clock is the default timebase which gives you a resolution of 10 us/count).


The picture display can probably be done with ~10 ms accuracy, but this will not be as deterministic as the DAQmx stuff is.




Message Edited by rpursley8 on 12-14-2007 02:47 PM
Randall Pursley
0 Kudos
Message 4 of 6
(3,849 Views)
Hi Randall,

Thanks a lot! This is really helping me on my way! I'll have lots of other stuff to do the upcoming few months, but if I have some time in between, I'll start fuddling with the LabVIEW software and I'll let you know when I start to run into walls again. A quick question already: Are you displaying pictures as well? Are you doing this with the same computer that's controlling the pulses or with a second computer running dedicated software (like Presentation, or E-prime).

Thanks again for your help.

Best regards,

Tom
0 Kudos
Message 5 of 6
(3,834 Views)
I have been displaying text up to now.  I will be displaying pictures, probably in the next one and I plan on using the same computer.  If you are doing pictures, you will have to either load all of them up at the beginning so they are in memory, or load each one up while the previous trial is going on so it will be ready to be used.  Hopefully the images you use are not too large or you may have problems.  The computer I am using has 3 GB of memory in it so that if I need to, I would be able to load all the images in memory at the beginning of the experiment.
Randall Pursley
0 Kudos
Message 6 of 6
(3,825 Views)