Dear All,
I am trying to send parallel port triggers to MEG immediately after
visual stimulus presentation. However, we found about +-5 ms
variability between stimulus onset and trigger onset when measured
with a light diode. The relevant codes we used to implement our
purpose are:
....% for drawing stimuli in BackBuffer; then
loop={
'Screen(''Flip'',workingWindow);' % immediately followed by next line:
'F_HFSP2_Trigger(trig,Trigger_Value,Trig_Signal_duration,Trigger_Open_switch);'
}
priorityLevel=2;
RUSH(loop,priorityLevel);
% actually I also tried a different version of above codes without
using loop/RUSH things, but it did not have too much difference.
In order to use parallel port, we used following codes to initialize
parallel port:
trig = digitalio('parallel' , 'LPT1');
data = addline(trig, 0:7,'out');
The function of sending trigger is:
function [] = F_HFSP2_Trigger(trigObject, trigger_value,duration,
trigger_Open_switch)
if Trigger_Open_switch
putvalue(trigObject, trigger_value);
WaitSecs(duration/1000);
putvalue(trigObject, 0);
end;
Parameters for using trigger sending function are:
The Trig_Signal_duration is 5 ms;
For behavioural experiment, Trigger_Open_switch =0; (i.e. do not need
trigger.)
For MEG experiment, Trigger_Open_switch =1;
The experimental setup we used is Matlab 7.04 (on windows XP) plus PTB
3 newest version. The CRT display refresh rate is 60 HZ.
Does anyone know a better way to do the triggering and would like to
point out what is wrong with our codes that might be the possible
reason for the +-5 ms variability between stimulus onset and trigger
onset? Any help and suggestion will be greatly appreciated.
Thank you very much!
-Zhao
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
--
Mae'r e-bost yma'n amodol ar delerau ac amodau ymwadiad e-bost Prifysgol
Bangor. Gellir darllen testun llawn yr ymwadiad yma:
http://www.bangor.ac.uk/emaildisclaimer
This email is subject to the terms and conditions of the Bangor University
email disclaimer. The full text of the disclaimer can be read here:
http://www.bangor.ac.uk/emaildisclaimer
I am trying to send parallel port triggers to MEG immediately after
visual stimulus presentation. However, we found about +-5 ms
variability between stimulus onset and trigger onset when measured
with a light diode. The relevant codes we used to implement our
purpose are:
....% for drawing stimuli in BackBuffer; then
loop={
'Screen(''Flip'',workingWindow);' % immediately followed by next line:
'F_HFSP2_Trigger(trig,Trigger_Value,Trig_Signal_duration,Trigger_Open_switch);'
}
priorityLevel=2;
RUSH(loop,priorityLevel);
% actually I also tried a different version of above codes without
using loop/RUSH things, but it did not have too much difference.
In order to use parallel port, we used following codes to initialize
parallel port:
trig = digitalio('parallel' , 'LPT1');
data = addline(trig, 0:7,'out');
The function of sending trigger is:
function [] = F_HFSP2_Trigger(trigObject, trigger_value,duration,
trigger_Open_switch)
if Trigger_Open_switch
putvalue(trigObject, trigger_value);
WaitSecs(duration/1000);
putvalue(trigObject, 0);
end;
Parameters for using trigger sending function are:
The Trig_Signal_duration is 5 ms;
For behavioural experiment, Trigger_Open_switch =0; (i.e. do not need
trigger.)
For MEG experiment, Trigger_Open_switch =1;
The experimental setup we used is Matlab 7.04 (on windows XP) plus PTB
3 newest version. The CRT display refresh rate is 60 HZ.
Does anyone know a better way to do the triggering and would like to
point out what is wrong with our codes that might be the possible
reason for the +-5 ms variability between stimulus onset and trigger
onset? Any help and suggestion will be greatly appreciated.
Thank you very much!
-Zhao
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
--
Mae'r e-bost yma'n amodol ar delerau ac amodau ymwadiad e-bost Prifysgol
Bangor. Gellir darllen testun llawn yr ymwadiad yma:
http://www.bangor.ac.uk/emaildisclaimer
This email is subject to the terms and conditions of the Bangor University
email disclaimer. The full text of the disclaimer can be read here:
http://www.bangor.ac.uk/emaildisclaimer