Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Support Forums
 Experimental Control
 ni-daq trigger at 4T

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
james.kragel Posted - Mar 18 2008 : 3:15:41 PM
I ran into some issues trying to trigger a stimuli script to the scanner at the 4T earlier today, using the following code.

ainidaq = analoginput('nidaq',1);
chan = addchannel(ainidaq,2);
duration = 2; % two second acquisition
set(ainidaq,'SampleRate',44100);
ActualRate = get(ainidaq,'SampleRate');
set(ainidaq,'SamplesPerTrigger',ActualRate*duration);
set(ainidaq,'TriggerChannel',chan);
set(ainidaq,'TriggerType','Software');
set(ainidaq,'TriggerCondition','Rising');
set(ainidaq,'TriggerConditionValue',1);
set(ainidaq,'TriggerFcn','scannertrigger');
start(ainidaq);
wait(ainidaq,26);
delete(ainidaq)
clear ainidaq

This method of triggering has worked in the past, but I ran into a couple of separate issues. The first is that there was an error concerning setting SamplesPerTrigger, as ActualRate was apparently not an integer value and this was causing crashes. After hard coding it to an integer, there were still issues coming up trying to set the TriggerFcn.

I'm curious as to whether or not there have been hardware/software changes I am unaware of, as this has worked in the past.

Thanks,

James

BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.26 seconds. Snitz Forums 2000