Cedrus RB-530 response box

 July 2010

I stopped using the Cedrus box as I did not succeed in geting reliable results. I got it working with the code below, but I found that every so often it would not record the subject’s response. Doubtless this was because of faults in my own code rather than any flaw in the Cedrus box, but ultimately I failed to figure out how to use it correctly. I gather from the Psychtoolbox Forum that others have encountered similar problems.

17th March 2008

I have bought a Cedrus response box from Cambridge Response Systems to record subjects’ responses. This has several advantages, e.g. allowing accurate reaction time measurements, but I bought it simply because I am doing some work with visually-impaired patients, and I thought its large, colourful buttons might be clearer and easier to use than a mouse. I am recording here my experience of getting it working with PTB.

Installation

This was fairly easy following the instructions on Cedrus’ website. I downloaded the drivers to C:\temp\cedrus, then plugged in the response box. I waited for Windows’ “Found new hardware” dialogue, and pointed it to c:\temp\cedrus. The green light on the back of the box then lit up, as expected. I then looked at Device Manager (Control Panel -> System -> Hardware -> Device Manager) as instructed on the Cedrus website, to see what com port the box had been assigned. For some reason it was not under “Ports (COM & LPT)” but was in a separate section, and said “this device is not working properly”. However, it gave me the option to reinstall drivers, so I pointed it to “C:\temp\cedrus” again, and it worked fine. Now it appeared as “Cedrus RB-x30 Response Pad (COM3)”.

Coloured keys

You can prise the top off each key and snap on either plain white surfaces, coloured surfaces, or see-through surfaces which you can use to put written labels on. These just snap off easily with a fingernail. It also came with a foam wrist-rest

Reading data with Matlab

The Cedrus response boxes have several ways of outputting data, described here. I decided to try using the “RB series” method, because I want to be able to read when a subject has released the key. You control which protocol is used via the 4 DIP switches on the back of the box. It ships with all 4 down, i.e. with the white switches on the same side as the printed numbers. This specifies “XID” protocol with a baud rate of 115k. For “RB series” protocol with a baud rate of 19200, you need switches 1 and 2 up, 3 and 4 down. It is important to note that the response pad “reads” the position of the switches only when it is powered up. If you change them, you will need to unplug the USB connector and plug it in again for the new settings to take effect.

I did have quite a few problems using Matlab to read data from the Cedrus box. Many thanks to Mario Kleiner of the Max Planck Institute for Biological Cybernetics, Steve Elliot of Cambridge Research Systems and Jon Peirce of the University of Nottingham Visual Neuroscience for generously helping me out. I found that the Cedrus box seems to work differently on my experimental machine from on my laptop (both PCs running Windows XP 32-bit), so this doesn’t give me a lot of confidence that the code below will work on other people’s machines. On my experimental PC, the main problem was that sometimes the box just wouldn’t respond to signals sent to it. According to Cedrus, for example, if you send the phrase ‘_d2’ to the box, it should then tell you what type of product it is. I have found that sometimes, say 1 time in 10, sending _d2 evokes no response. This isn’t a timing problem — there is a separate timing issue, in that even if there is a response, it can take tens of milliseconds to arrive, so I also put a WaitSecs(0.1) before trying to read the response. But sometimes the command just seems to get lost. So I had to make copious use of BytesAvailable and “while” loops, to keep on resending the command until I got a response.