online trigger of keybaord responses
Tony Zuccolotto
anthony.zuccolotto at pstnet.com
Wed Aug 2 17:56:40 UTC 2006
David,
In some experiments you can get reasonable results if you happen to be
terminating your stimulus on a key press and then immediately using
WritePort as you have described below (whether or not this approach is
feasible depends on the nature of your specific paradigm). Another
approach you could use would be to set a different duration for the
Duration property and the Time Limit property (e.g. 0 for the Duration
and 5000ms on the Time Limit). This way you can get into Inline
script immediately after the stimulus is presented and then you can poll
the Stimulus.InputMask(1).IsPending method to determine when the
response is logged and then use WritePort at that time. A more
advanced way of getting into an Inline script immediately after the
stimulus is displayed is to set your PreRelease property equal to the
Duration of the object, e.g. this will allow the current object to
display its stimulus, enable any response, and then move on.
Overall though I would say the most generic and consistent approach
would be to do this via hardware, i.e. take a trigger directly from your
input device and give it to both E-Prime and whatever other
hardware/software you need to send it to. You don't have many options
if you are using a keyboard directly, but you do have options if you are
using other types of input devices. PST has various button response
system that are targeted at use in fMRI studies which, when used with
E-Prime would provide the same accuracy of the PST Serial Response Box
and also includes an external digital I/O port which you use to tap
directly into the switch signal and provide it to another piece of
equipment. Within E-Prime you should be able to add the device to your
experiment and tell it to Emulate the Keyboard device and your
experiment should continue running as is (but with more consistent
timing accuracy than the keyboard can provide). Another alternative
would be to create your own switch/input device and wire it up to either
a PST Serial Response Box or connect it to the parallel port. You
would then use either the SRBOX or Port device respectively in E-Prime,
but because you are creating the switch you can take your own signal off
the switch and send it to other equipment as needed.
Hope that gives you some options.
Tony
Anthony P. Zuccolotto
President and Chief Executive Officer
Psychology Software Tools, Inc.
2050 Ardmore Boulevard
Suite 200
Pittsburgh, PA 15221-4610
Phone 412-271-5040
FAX 412-271-7077
Email anthony.zuccolotto at pstnet.com
Internet http://www.pstnet.com <http://www.pstnet.com/>
________________________________
From: eprime at mail.talkbank.org [mailto:eprime at mail.talkbank.org] On
Behalf Of David Hairston
Sent: Wednesday, August 02, 2006 12:36 PM
To: EPRIME at mail.talkbank.org
Subject: online trigger of keybaord responses
I would like to get an externally triggered record of a keyboard press
for use with an MEG system.
Is there a way to get a time-locked onset signal or "trigger" of a
keyboard/mouse response at the time it is made, similar to the
.OnsetSignalEnabled property for runnable objects, even if the current
object is still executing?
Ideally I'd like to have access to the accuracy of said response,
evaluate it and send an external digital signal signifying this... but
just getting a signal out at all would be workable.
I know it can be done easily AFTER the target object has occurred, for
example something like "if rresponse.ACC = 1 then WritePort &378, 1".
However, this is only (relatively) time-locked w/ the response in the
case where the response terminates the object; in the case of a
fixed-duration with recorded response, the evaluation/trigger would not
occur until afterwards, and hence somewhat later than the actual
response time.
Does anybody have some insight on a trick to get this?
Thanks
W. David Hairston, Ph.D.
ANSIR Lab
Dept of Radiology
Wake Forest University School of Medicine
Medical Center Blvd
Winston-Salem NC 27157
(336) 716-7160 (Offiice)
(336) 716 0798 (Fax)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20060802/639a06d5/attachment.htm>
More information about the Eprime
mailing list