Response trigger to parallel port


Author
Message
thompsdc
thompsdc
Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)
Group: Forum Members
Posts: 2, Visits: 2
Dave - Friday, November 3, 2017
thompsdc - Friday, November 3, 2017
Hello,
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.



Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
thompsdc - Friday, November 3, 2017
Hello,
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.

thompsdc
thompsdc
Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)Associate Member (147 reputation)
Group: Forum Members
Posts: 2, Visits: 2
Hello,
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.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search