Diff for "CheckPort" - Meg Wiki
location: Diff for "CheckPort"
Differences between revisions 1 and 2
Revision 1 as of 2015-10-06 10:48:30
Size: 571
Editor: OlafHauk
Comment:
Revision 2 as of 2015-10-06 10:49:31
Size: 618
Editor: OlafHauk
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from EyeTrackingCheckPort

You can include this bit of code in your PsychToolbox script to make sure you have selected the right port of the stimulus PC:

function memento(MEG)
% Very simple script to check whether the correct port is selected
%
% memento must pre preceded by the MEGSynchClass constructor
% e.g.
% MEG  =  MEGSynchClass;
% memento(MEG)
%
%alessandro.tomassini@mrc-cbu.cam.ac.uk


try   
 MEG.WaitForButtonPress(0.0001)
 strcmp(MEG.LastButtonPress',MEG.LastButtonPress);
catch
    h=warndlg('Check if NI CARD is selected!');
    uiwait(h);
end
end

CbuMeg: CheckPort (last edited 2015-10-06 10:49:31 by OlafHauk)