ScannerSync - MRC CBU Imaging Wiki

ActiveX DLL for synchronising scanner from Windows programs

The ScannerSync library allows you to synchronise your Windows stimulus delivery program (e.g., Visual Basic, Eprime, Matlab) to the pulses from the scanner. It also allows you to collect responses from the button box.

It allows simple sychronisation (e.g., wait until pulse) or more complicated patterns of sychronisation (e.g., wait until 500 ms after the tenth pulse). It also allows accurate measurement of the TR, even if every pulse is not heard because your program is doing something else at the time.

Creating and intialising the ActiveX object

Visual Basic

Go to Project > References and tick the "MRISync" object. If it says "Missing: MRISync" it is because you have linked to a version not on the current system. In this case, untick the box, close the window, reopen it and tick the "MRISync" object.

At the top of your code put

Dim objSS as New ScannerSync

If you are using a computer that has a Keithly PIO card (e.g., the mimic machine, or one of the actual stimulus delivery machines) then initialise the card with

objSS.Initialise ""

If you are testing your program on a computer without a Keithly PIO card (e.g., your desktop), instead of Initialise put

objSS.SetPretendMode True

Then, put

objSS.StartExperiment 2000

where "2000" is the TR in milliseconds.

From Matlab

From Eprime

In your User Script put

ScannerSync (last edited 2006-07-25 13:41:23 by RhodriCusack)

(c) MRC Cognition and Brain Sciences Unit 2009