simultaneous response

David McFarlane mcfarla9 at msu.edu
Fri Feb 8 16:24:13 UTC 2008


Egbert,

>I'm using a custom button box made by one of our technicians here 
>and it is connected to the printer port.

Excellent.

>I've come up with a solution but it is not elegant. I've made an 
>Inline script which reads the
>reaction times from both button presses. If the difference between 
>the two reaction times is bigger then 50 msec the response is not 
>considered to be simultaneous and subjects will get a feedback 
>screen that they have to press the two buttons at the same time.

Sounds pretty good to me.  But if you want more...  Since it comes in 
through the printer port, you probably get all the buttons at once in 
a single byte.  E.g., button 1 alone might show up as decimal 1 
(binary 00000001), button 2 alone as decimal 2 (binary 00000010), and 
buttons 1 and 2 together as decimal 3 (binary 00000011).  With that 
knowledge you can use some script with Or and And to inspect 
individual bits (preferably with binary masks in hexadecimal 
notation), and possibly some If Thens, or Select Case, and you should 
be able to detect anything you want.  E.g., if you just wanted any 
two buttons down, you might use a loop and a rotating 1-bit mask to 
count the number of "1" bits.  And if you just want to see if some 
particular pair of buttons is down, even easier.  E.g, if you just 
care about buttons 1 and 2, this should do it:

If (StimulusObject.RESP And &H03) = &H03 Then ...

>I'll dive into the files you've send me to see if there is a more elegant way.

The programs that I sent you won't see your button box, but you can 
modify them to do that.

Good luck!

-- David McFarlane, Systems Designer
    Dept. Psychology, Michigan State University


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime-unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list