ResponseCollection - Meg Wiki
location: ResponseCollection

Response collection

Button boxes

We have two 4-button optical button boxes for use with the MEG. Usually all 8 outputs will be connected to the trigger box in the stimulus cabinet. The channels used are 9-16. These boxes can be used with the table insert for the MEG seat. They are a bit slippery and produce an audible click when pressed, and it might be good to put them on a mouse mat for these reasons (the mat prevents the table insert to resonate with the button click, making it a bit quieter). Alternatively a pillow can be used instead of the insert.


Elekta Neuromag also supplied us with two button panels, which work in a different way. There's no button but a strip of material that has to be pushed down. The normal button boxes will click when switching, but these EN panels don't give any tactile feedback. They also have a tendency to come on again if the strip is pushed deeper, producing the sequence on-off-on-off-on for a single press and release.

These panels can also be used 'upside down' and will then detect when a finger is put down. This requires the subject to lift their finger in between responses.

Using the button boxes with E-Prime

To access the button presses from E-Prime the signals from the EN box will have to be connected to the parallel port. There are 5 input channels available on a parallel port.

To enable using button presses in E-Prime do:

1 - Enable the port device, adress &H378, 16 bits or &H379, 8 bits.

2 - Patch the output(s) from the EN box to one of the Status channels of the parallel port patch box. The status channels are S3, S4, S5, S6 and S7, where S7 is hardware inverted, so sends a 'release' when pressed and a 'press' when released. The corresponding values for these channels in E-Prime are 4, 5, 6, 7 and 8 when used with the &H379 port adress.

As the Status 7 channel is inverted, it will send a -8 value when the button is pressed and a 8 value when it is released. This means that normally the response time that E-Prime records for a button will be the time it is released! To get around this you have to do two things. First, go to the port device and edit the settings. There's a box called 'Collection mode' which by default is set to 'Presses only'. Change this to 'Presses and releases'. Secondly, in the E-Prime object collecting the response go to 'properties' and then 'duration/input'. Add the port to the input devices and in the 'Allowed' field type '567{-8}' (without the quotes, obviously). The '567' part are the first three button, which are normal, and the '{-8}' part is the fourth button, for which we want to respond to the release instead of the press.

The recommended way to use the port in E-Prime is to specify separate 'Port' objects in your script for input and output. The output port should have the &H378 adress and is used for sending triggers. The input port uses the &H379 adress and is used for receiving button presses.

Normally you don't need to specify the output port, as we usually send triggers using the E-Prime OnsetSignal mechanism. See the Triggers section for this.

Testing the button boxes

The EN trigger box on the desk has small LEDs next to each channel which show the incoming or outgoing signal. When a button is pressed, and the the box has been connected properly, one of the lights will come on. To check which channel is being activated on the PIO card or the parallel port there's a small program on the machine, called PortTest that will show the signals coming into either the PIO card or the parallel port.


An optical microphone is permanently installed in the MSR, ready for use. It has a flexible arm to enable positioning close to the volunteer. Voice key responses are possible in MEG, although continuous HPI recording is recommended for this to enable correction for head movements, which are difficult to prevent while speaking. Online voice key, using the E-Prime response box, is possible, but off line voice key is recommended. For this you simply record all vocal responses of the subject, in E-Pime, and use a seperate programme later to extract the latencies. The microphone itself is an 'OPTOMIC MEG' made by Opto Acoustics. It is omnidirectional with a frequency response of 30-15,000 Hz (+/- 3dB)

CbuMeg: ResponseCollection (last edited 2014-02-03 16:33:43 by MaartenVanCasteren)