Millisecond Forums

How to send response-locked TTL signals?

https://forums.millisecond.com/Topic1721.aspx

By TonyF - 7/15/2008

Can anyone please tell me what is the correct method of using Inquisit 2.0 to send response-locked TTL signals? I'm doing EEG research, and I need to send a signal to my EEG-acquisition software indicating when participants respond (I'm able to send stimulus-locked signals with no problem).


Sincere thanks,


Tony Freitas

By Dave - 7/15/2008

Hi Tony,

as I've never actually done this in Inquisit, I'm kinda venturing on unknown territory here, but I'll tell you how I'd do it, anyway...;-)  First, I'm suspecting that communication with your EEG is done via the computer's LPT port. I also suspect that you've already defined a working <port> element in Inquisit. As you know, the <port> element essentially behaves like any other stimulus (picture, text, etc.). So, in your trials, you could specify some /responsemessage attributes to "present" the respective port stimulus (thus sending a signal to your EEG as soon as a participant has responded). For example:

<port EEGsignal>
/ port = LPT1
/ subport = data
/ items = ("00000001")
</port>


<trial EEGtrial>
/ stimulusframes = [1=somepicture]
/ validresponse = ("a", "b")
/ responsemessage = ("a", EEGsignal, 0)
/ responsemessage = ("b", EEGsignal, 0)
</trial>

I'm pretty sure there are numerous other ways to do this, but I think my suggestion might work for you. Please report back!

Best,
~Dave
By TonyF - 7/22/2008

Has anyone out there ever successfully sent a response-locked TTL signal via Inquisit 2.0? If so, the sharing of a working script that will do so would be most appreciated. 


Sincere thanks to Dave for taking the time to make the above suggestion. I gave this a try, and I also previously tried something similar, and also the errorfeedback/correctfeedback functions, but these have not worked for me. The strange thing is that a response-locked signal will go out sometimes, but only extremely rarely (I am able to send stimulus-locked signals without any problem). So, before I try to work any further on this, I am wondering if there is any guidance available as to what is generally seen as the best way to send a response-locked TTL signal via Inquisit.


Thanks in advance for any advice on this,


Tony

By seandr - 7/22/2008

Tony,


I think Dave's approach is the best way to send response-locked TTL signals.


Strange that your signals are appearing sporadically. Perhaps this is a timing issue - specifically, is it possible the pulses are too short to be detected by whatever device is monitoring them? To check this, try the following modifications:


<port EEGsignal>
/ port = LPT1
/ subport = data
/ items = ("00000001")
/ erase = true("00000000")
</port>


<trial EEGtrial>
/ stimulusframes = [1=somepicture]
/ validresponse = ("a", "b")
/ responsemessage = ("a", EEGsignal, 100)
/ responsemessage = ("b", EEGsignal, 100)
</trial>


Note that I added the /erase command to the <port> definition just to be explicit - by defaut the port should be set to zero when it's erased.


I also changed the duration of the signal to 100 milliseconds rather the 0. If set to 0, the signal is presented for the remainder of the trial, which will actually be 0 ms unless you've set a posttrialpause.


Try these modifications and let me know if that helps.


Regards,
Sean


By TonyF - 9/19/2008

Dear Dave and Sean,


Thanks very much for the suggestions. The signals are going out fine now. My problem was that I was sending my own clear signal between other signals (because I have my system set up to use 11110000 as clear); this step was needed for other software I've used, but somehow it interfered with things in this case.


Anyway, my stimulus-locked and reponse-locked signals are going out fine now, and thanks again for the suggestions,


Tony

By ChrisS - 9/23/2014

Hi Tony,

I'm trying to do the same thing with my paradigm. I tried the above suggestions but for some reason it didn't work for me. 

Here's a section of mine. Do you have any suggestions?
********************************************************************************
MARKERS
********************************************************************************

<port pressmarker>
/ port = lpt1
/ subport = data
/ items = ("00001001")
/ erase = true ("00000000")
</port>

********************************************************************************
TRIALS
********************************************************************************

<trial green1>
/ trialduration = 1500
/ stimulustimes = [0= green; 0= greenmarker]
/ validresponse = (" ",noresponse,"p")
/ correctresponse = (" ")
/ responsemessage = (" ", pressmarker, 100)
/ responsetrial = (" ",correctfeedback1)
/ responsetrial = (noresponse,incorrectfeedback1)
/ responsetrial = ("p",pausetrial)
</trial>