+x+xHello,
I am trying to send a trigger to the parallel port for EEG recording using the following function:
<port mysignal>
/ port = lpt2
/ subport = data
/ items = ("00000001")
</port>
I can send a trigger at the onset of a stimulus like so (example from CPTRosvold task):
<trial x>
/ stimulusframes = [1=blank, x, trig01]
/ trialduration = 920
/ posttrialpause = 230
/ validresponse = (" ", noresponse)
/ correctresponse = (" ")
/ ontrialend = [if ( block.x.totalcount >= 2 && trial.x.correct == false ) values.xtestomissionerrorcount += 1]
/ ontrialend = [if ( block.x.totalcount >= 2 ) values.xtestomissiontrialcount += 1]
/ ontrialend = [if ( block.x.totalcount >= 2 ) values.xtestomissionerrorrate = values.xtestomissionerrorcount / values.xtestomissiontrialcount ]
</trial>
However I'd like a 2nd trigger when the user responds. Is this possible?
Thank you in advance.
You can send the trigger via the <trial>'s /responsemessage attribute.
Thank you for the response. I found the documentation to be very vague on the /responsemessage command, but through trial-and-error I found this code to work (from above sample):
<trial x>
/ stimulusframes = [1=blank, x, trig01]
/ trialduration = 920
/ posttrialpause = 230
/ validresponse = (" ", noresponse)
/ correctresponse = (" ")
/ responsemessage = (" ",trig02,0)
/ ontrialend = [if ( block.x.totalcount >= 2 && trial.x.correct == false ) values.xtestomissionerrorcount += 1]
/ ontrialend = [if ( block.x.totalcount >= 2 ) values.xtestomissiontrialcount += 1]
/ ontrialend = [if ( block.x.totalcount >= 2 ) values.xtestomissionerrorrate = values.xtestomissionerrorcount / values.xtestomissiontrialcount ]
</trial>
This will send a trig01 when the stimuls x starts, and then send a trig02 when the user responds correctly.