Sending a trigger for stimulus onset and button press


Author
Message
Nothando Nkambule
Nothando Nkambule
Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)
Group: Forum Members
Posts: 21, Visits: 51
Hi, can anyone please help. I need help on how I can code sending trigger for stimulus onset and button press for IMPLICIT ASSOCIATION TEST. I have already found a way to send trigger for event types  such as TARGET AND ATTRIBUTE THEN COMPATIBLE AND INCOMPATIBLE TRIAL .However, I have no idea how to write a code for button press
so here is an example of one trigger that I have coded and it works , it is for the event type

port settings
***********************************************************************
<port marker1>
/ items = ("00000001")
/ port = LPT1
/ subport = data

</port>

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ posttrialpause = 1200
</trial>

this trigger  "/ stimulusframes = [1 = attributeA,marker1]" marks attribute A when its on the left.



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
Tash - Sunday, September 24, 2017
Hi, can anyone please help. I need help on how I can code sending trigger for stimulus onset and button press for IMPLICIT ASSOCIATION TEST. I have already found a way to send trigger for event types  such as TARGET AND ATTRIBUTE THEN COMPATIBLE AND INCOMPATIBLE TRIAL .However, I have no idea how to write a code for button press
so here is an example of one trigger that I have coded and it works , it is for the event type

port settings
***********************************************************************
<port marker1>
/ items = ("00000001")
/ port = LPT1
/ subport = data

</port>

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ posttrialpause = 1200
</trial>

this trigger  "/ stimulusframes = [1 = attributeA,marker1]" marks attribute A when its on the left.



Define additional <port> elements for the response triggers e.g

<port markerE>
...
</port>

<port markerA>
...
</port>

and then "display" them via the trial's /responsemessage attributes:

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ responsemessage = ("A", markerA, 500)
/ responsemessage = ("E", markerE, 500)

/ posttrialpause = 1200
</trial>
Nothando Nkambule
Nothando Nkambule
Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)
Group: Forum Members
Posts: 21, Visits: 51
Dave - Monday, September 25, 2017
Tash - Sunday, September 24, 2017
Hi, can anyone please help. I need help on how I can code sending trigger for stimulus onset and button press for IMPLICIT ASSOCIATION TEST. I have already found a way to send trigger for event types  such as TARGET AND ATTRIBUTE THEN COMPATIBLE AND INCOMPATIBLE TRIAL .However, I have no idea how to write a code for button press
so here is an example of one trigger that I have coded and it works , it is for the event type

port settings
***********************************************************************
<port marker1>
/ items = ("00000001")
/ port = LPT1
/ subport = data

</port>

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ posttrialpause = 1200
</trial>

this trigger  "/ stimulusframes = [1 = attributeA,marker1]" marks attribute A when its on the left.



Define additional <port> elements for the response triggers e.g

<port markerE>
...
</port>

<port markerA>
...
</port>

and then "display" them via the trial's /responsemessage attributes:

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ responsemessage = ("A", markerA, 500)
/ responsemessage = ("E", markerE, 500)

/ posttrialpause = 1200
</trial>

Thanks, I will give it a try.
Nothando Nkambule
Nothando Nkambule
Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)
Group: Forum Members
Posts: 21, Visits: 51
Dave - Monday, September 25, 2017
Tash - Sunday, September 24, 2017
Hi, can anyone please help. I need help on how I can code sending trigger for stimulus onset and button press for IMPLICIT ASSOCIATION TEST. I have already found a way to send trigger for event types  such as TARGET AND ATTRIBUTE THEN COMPATIBLE AND INCOMPATIBLE TRIAL .However, I have no idea how to write a code for button press
so here is an example of one trigger that I have coded and it works , it is for the event type

port settings
***********************************************************************
<port marker1>
/ items = ("00000001")
/ port = LPT1
/ subport = data

</port>

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ posttrialpause = 1200
</trial>

this trigger  "/ stimulusframes = [1 = attributeA,marker1]" marks attribute A when its on the left.



Define additional <port> elements for the response triggers e.g

<port markerE>
...
</port>

<port markerA>
...
</port>

and then "display" them via the trial's /responsemessage attributes:

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ responsemessage = ("A", markerA, 500)
/ responsemessage = ("E", markerE, 500)

/ posttrialpause = 1200
</trial>

I am trying to make sense of the code , what is the 500 for?
My IAT code has a feedback when the input is incorrect, so  I am also interested in clearly marking when there has been an error.
I would like to send a trigger for when a participant makes a wrong button press, and what they change their response to when they correct the error
since there are two types of button press , this is what I have come up with, I have not tested it yet . 
This is an example of when a participants  makes an incorrect button press such as "E", gets a feedback and then makes the correct button press of "I" 

<port markerE>
/ items =("00000111")
/ port = LPT1
/ subport = data
</port>

<port markerI>
/ items =("00001000")
/ port = LPT1
/ subport = data
</port>

<port marker EI>
/ items = ("00001001")
/ port = LPT1
/ subport = data
</port>


<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB,marker2]
/ responsemessage = ("E", markerE, 500)
/ responsemessage = ("I", markerI, 500)
/ responsemessage = ("EI", markerEI, 500)
/ posttrialpause = 1200
</trial>


Does this make any sense?





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
Tash - Friday, September 29, 2017
Dave - Monday, September 25, 2017
Tash - Sunday, September 24, 2017
Hi, can anyone please help. I need help on how I can code sending trigger for stimulus onset and button press for IMPLICIT ASSOCIATION TEST. I have already found a way to send trigger for event types  such as TARGET AND ATTRIBUTE THEN COMPATIBLE AND INCOMPATIBLE TRIAL .However, I have no idea how to write a code for button press
so here is an example of one trigger that I have coded and it works , it is for the event type

port settings
***********************************************************************
<port marker1>
/ items = ("00000001")
/ port = LPT1
/ subport = data

</port>

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ posttrialpause = 1200
</trial>

this trigger  "/ stimulusframes = [1 = attributeA,marker1]" marks attribute A when its on the left.



Define additional <port> elements for the response triggers e.g

<port markerE>
...
</port>

<port markerA>
...
</port>

and then "display" them via the trial's /responsemessage attributes:

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ responsemessage = ("A", markerA, 500)
/ responsemessage = ("E", markerE, 500)

/ posttrialpause = 1200
</trial>

I am trying to make sense of the code , what is the 500 for?
My IAT code has a feedback when the input is incorrect, so  I am also interested in clearly marking when there has been an error.
I would like to send a trigger for when a participant makes a wrong button press, and what they change their response to when they correct the error
since there are two types of button press , this is what I have come up with, I have not tested it yet . 
This is an example of when a participants  makes an incorrect button press such as "E", gets a feedback and then makes the correct button press of "I" 

<port markerE>
/ items =("00000111")
/ port = LPT1
/ subport = data
</port>

<port markerI>
/ items =("00001000")
/ port = LPT1
/ subport = data
</port>

<port marker EI>
/ items = ("00001001")
/ port = LPT1
/ subport = data
</port>


<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB,marker2]
/ responsemessage = ("E", markerE, 500)
/ responsemessage = ("I", markerI, 500)
/ responsemessage = ("EI", markerEI, 500)
/ posttrialpause = 1200
</trial>


Does this make any sense?





/ responsemessage = ("EI", markerEI, 500)

No, this does not make sense. "EI" is not a response, and this responsemessage will never fire.

The "500" merely designates the (minimum) duration of the stimulus; it's not really relevant in your case, because you have a /posttrialpause longer than that (1200ms). The TTL signal will remain raised for the entire duration of the postrialpause.

Unrelated, but what you'll also want to do is "turn off" the stimulus onset marker at some point, so that you get a clear separation between the onset marker and the response  markers in your recording. I.e.

<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB,marker2; 3=markeroff]
/ beginresponseframe = 1
/ responsemessage = ("E", markerE, 500)
/ responsemessage = ("I", markerI, 500)
/ posttrialpause = 1200
</trial>

with

<port markeroff>
/ items = ("00000000")
/ port = LPT1
/ subport = data
</port>
Nothando Nkambule
Nothando Nkambule
Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)
Group: Forum Members
Posts: 21, Visits: 51
Dave - Friday, September 29, 2017
Tash - Friday, September 29, 2017
Dave - Monday, September 25, 2017
Tash - Sunday, September 24, 2017
Hi, can anyone please help. I need help on how I can code sending trigger for stimulus onset and button press for IMPLICIT ASSOCIATION TEST. I have already found a way to send trigger for event types  such as TARGET AND ATTRIBUTE THEN COMPATIBLE AND INCOMPATIBLE TRIAL .However, I have no idea how to write a code for button press
so here is an example of one trigger that I have coded and it works , it is for the event type

port settings
***********************************************************************
<port marker1>
/ items = ("00000001")
/ port = LPT1
/ subport = data

</port>

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ posttrialpause = 1200
</trial>

this trigger  "/ stimulusframes = [1 = attributeA,marker1]" marks attribute A when its on the left.



Define additional <port> elements for the response triggers e.g

<port markerE>
...
</port>

<port markerA>
...
</port>

and then "display" them via the trial's /responsemessage attributes:

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ responsemessage = ("A", markerA, 500)
/ responsemessage = ("E", markerE, 500)

/ posttrialpause = 1200
</trial>

I am trying to make sense of the code , what is the 500 for?
My IAT code has a feedback when the input is incorrect, so  I am also interested in clearly marking when there has been an error.
So since u have suggested this  , this is what I have come up with, I have not tested it yet . 
This is an example of when a participants  makes an incorrect button press such as "E", gets a feedback and then makes the correct button press of "I" 

<port markerE>
/ items =("00000111")
/ port = LPT1
/ subport = data
</port>

<port markerI>
/ items =("00001000")
/ port = LPT1
/ subport = data
</port>

<port marker EI>
/ items = ("00001001")
/ port = LPT1
/ subport = data
</port>


<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB,marker2]
/ responsemessage = ("E", markerE, 500)
/ responsemessage = ("I", markerI, 500)
/ responsemessage = ("EI", markerEI, 500)
/ posttrialpause = 1200
</trial>


Does this make any sense?





/ responsemessage = ("EI", markerEI, 500)

No, this does not make sense. "EI" is not a response, and this responsemessage will never fire.

The "500" merely designates the (minimum) duration of the stimulus; it's not really relevant in your case, because you have a /posttrialpause longer than that (1200ms). The TTL signal will remain raised for the entire duration of the postrialpause.

Unrelated, but what you'll also want to do is "turn off" the stimulus onset marker at some point, so that you get a clear separation between the onset marker and the response  markers in  your recording. I.e.

<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB,marker2; 3=markeroff]
/ beginresponseframe = 1
/ responsemessage = ("E", markerE, 500)
/ responsemessage = ("I", markerI, 500)
/ posttrialpause = 1200
</trial>

with

<port markeroff>
/ items = ("00000000")
/ port = LPT1
/ subport = data
</port>

Hi Dave !

Thank you, I have implemented the changes and checked the code, it works. Thanks again.

I would like to clarify a TWO points
1) So since u have suggested this: 
 "you'll also want to do is "turn off" the stimulus onset marker at some point, so that you get a clear separation between the onset marker and the response  markers in  your recording. I.e."
does that mean I do not need to send a trigger for stimulus onset?

2) How do I send a trigger for incorrect responses, and how can I code a trigger that will show the correct response following an incorrect response?







Nothando Nkambule
Nothando Nkambule
Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)
Group: Forum Members
Posts: 21, Visits: 51
Dave - Friday, September 29, 2017
Tash - Friday, September 29, 2017
Dave - Monday, September 25, 2017
Tash - Sunday, September 24, 2017
Hi, can anyone please help. I need help on how I can code sending trigger for stimulus onset and button press for IMPLICIT ASSOCIATION TEST. I have already found a way to send trigger for event types  such as TARGET AND ATTRIBUTE THEN COMPATIBLE AND INCOMPATIBLE TRIAL .However, I have no idea how to write a code for button press
so here is an example of one trigger that I have coded and it works , it is for the event type

port settings
***********************************************************************
<port marker1>
/ items = ("00000001")
/ port = LPT1
/ subport = data

</port>

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ posttrialpause = 1200
</trial>

this trigger  "/ stimulusframes = [1 = attributeA,marker1]" marks attribute A when its on the left.



Define additional <port> elements for the response triggers e.g

<port markerE>
...
</port>

<port markerA>
...
</port>

and then "display" them via the trial's /responsemessage attributes:

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ responsemessage = ("A", markerA, 500)
/ responsemessage = ("E", markerE, 500)

/ posttrialpause = 1200
</trial>

I am trying to make sense of the code , what is the 500 for?
My IAT code has a feedback when the input is incorrect, so  I am also interested in clearly marking when there has been an error.
I would like to send a trigger for when a participant makes a wrong button press, and what they change their response to when they correct the error
since there are two types of button press , this is what I have come up with, I have not tested it yet . 
This is an example of when a participants  makes an incorrect button press such as "E", gets a feedback and then makes the correct button press of "I" 

<port markerE>
/ items =("00000111")
/ port = LPT1
/ subport = data
</port>

<port markerI>
/ items =("00001000")
/ port = LPT1
/ subport = data
</port>

<port marker EI>
/ items = ("00001001")
/ port = LPT1
/ subport = data
</port>


<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB,marker2]
/ responsemessage = ("E", markerE, 500)
/ responsemessage = ("I", markerI, 500)
/ responsemessage = ("EI", markerEI, 500)
/ posttrialpause = 1200
</trial>


Does this make any sense?





/ responsemessage = ("EI", markerEI, 500)

No, this does not make sense. "EI" is not a response, and this responsemessage will never fire.

The "500" merely designates the (minimum) duration of the stimulus; it's not really relevant in your case, because you have a /posttrialpause longer than that (1200ms). The TTL signal will remain raised for the entire duration of the postrialpause.

Unrelated, but what you'll also want to do is "turn off" the stimulus onset marker at some point, so that you get a clear separation between the onset marker and the response  markers in your recording. I.e.

<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB,marker2; 3=markeroff]
/ beginresponseframe = 1
/ responsemessage = ("E", markerE, 500)
/ responsemessage = ("I", markerI, 500)
/ posttrialpause = 1200
</trial>

with

<port markeroff>
/ items = ("00000000")
/ port = LPT1
/ subport = data
</port>
On another note, I thinks I understand the function of this 
 / stimulusframes = [1 = attributeB,marker2; 3=markeroff]
/ beginresponseframe = 1

However, now that it is included in my code, the trigger for event type no longer appears on the neuroscan graph, when the code is running, why is that the case? and how can I fix it. Thanks.





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
Tash - Monday, October 2, 2017
Dave - Friday, September 29, 2017
Tash - Friday, September 29, 2017
Dave - Monday, September 25, 2017
Tash - Sunday, September 24, 2017
Hi, can anyone please help. I need help on how I can code sending trigger for stimulus onset and button press for IMPLICIT ASSOCIATION TEST. I have already found a way to send trigger for event types  such as TARGET AND ATTRIBUTE THEN COMPATIBLE AND INCOMPATIBLE TRIAL .However, I have no idea how to write a code for button press
so here is an example of one trigger that I have coded and it works , it is for the event type

port settings
***********************************************************************
<port marker1>
/ items = ("00000001")
/ port = LPT1
/ subport = data

</port>

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ posttrialpause = 1200
</trial>

this trigger  "/ stimulusframes = [1 = attributeA,marker1]" marks attribute A when its on the left.



Define additional <port> elements for the response triggers e.g

<port markerE>
...
</port>

<port markerA>
...
</port>

and then "display" them via the trial's /responsemessage attributes:

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ responsemessage = ("A", markerA, 500)
/ responsemessage = ("E", markerE, 500)

/ posttrialpause = 1200
</trial>

I am trying to make sense of the code , what is the 500 for?
My IAT code has a feedback when the input is incorrect, so  I am also interested in clearly marking when there has been an error.
I would like to send a trigger for when a participant makes a wrong button press, and what they change their response to when they correct the error
since there are two types of button press , this is what I have come up with, I have not tested it yet . 
This is an example of when a participants  makes an incorrect button press such as "E", gets a feedback and then makes the correct button press of "I" 

<port markerE>
/ items =("00000111")
/ port = LPT1
/ subport = data
</port>

<port markerI>
/ items =("00001000")
/ port = LPT1
/ subport = data
</port>

<port marker EI>
/ items = ("00001001")
/ port = LPT1
/ subport = data
</port>


<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB,marker2]
/ responsemessage = ("E", markerE, 500)
/ responsemessage = ("I", markerI, 500)
/ responsemessage = ("EI", markerEI, 500)
/ posttrialpause = 1200
</trial>


Does this make any sense?





/ responsemessage = ("EI", markerEI, 500)

No, this does not make sense. "EI" is not a response, and this responsemessage will never fire.

The "500" merely designates the (minimum) duration of the stimulus; it's not really relevant in your case, because you have a /posttrialpause longer than that (1200ms). The TTL signal will remain raised for the entire duration of the postrialpause.

Unrelated, but what you'll also want to do is "turn off" the stimulus onset marker at some point, so that you get a clear separation between the onset marker and the response  markers in your recording. I.e.

<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB,marker2; 3=markeroff]
/ beginresponseframe = 1
/ responsemessage = ("E", markerE, 500)
/ responsemessage = ("I", markerI, 500)
/ posttrialpause = 1200
</trial>

with

<port markeroff>
/ items = ("00000000")
/ port = LPT1
/ subport = data
</port>
On another note, I thinks I understand the function of this 
 / stimulusframes = [1 = attributeB,marker2; 3=markeroff]
/ beginresponseframe = 1

However, now that it is included in my code, the trigger for event type no longer appears on the neuroscan graph, when the code is running, why is that the case? and how can I fix it. Thanks.





So, to clarify, when you send the marker2 trigger via your /stimulusframes, that signal will remain raised throughout the trial. This can interfere with the signals -- the response triggers -- that you send later. Hence it's normally a good idea to (1) send the event trigger (raise the signal), and then (2) turn it off (lower the signal) some time later to avoid any possible interference with the response triggers. As for it's not showing up anymore: It may be that

 / stimulusframes = [1 = attributeB,marker2; 3=markeroff]

is not raising the signal long enough. Try delaying the markeroff trigger a little longer, e.g.

 / stimulusframes = [1 = attributeB,marker2; 5=markeroff]

Hope this helps.

Nothando Nkambule
Nothando Nkambule
Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)
Group: Forum Members
Posts: 21, Visits: 51
Dave - Monday, October 2, 2017
Tash - Monday, October 2, 2017
Dave - Friday, September 29, 2017
Tash - Friday, September 29, 2017
Dave - Monday, September 25, 2017
Tash - Sunday, September 24, 2017
Hi, can anyone please help. I need help on how I can code sending trigger for stimulus onset and button press for IMPLICIT ASSOCIATION TEST. I have already found a way to send trigger for event types  such as TARGET AND ATTRIBUTE THEN COMPATIBLE AND INCOMPATIBLE TRIAL .However, I have no idea how to write a code for button press
so here is an example of one trigger that I have coded and it works , it is for the event type

port settings
***********************************************************************
<port marker1>
/ items = ("00000001")
/ port = LPT1
/ subport = data

</port>

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ posttrialpause = 1200
</trial>

this trigger  "/ stimulusframes = [1 = attributeA,marker1]" marks attribute A when its on the left.



Define additional <port> elements for the response triggers e.g

<port markerE>
...
</port>

<port markerA>
...
</port>

and then "display" them via the trial's /responsemessage attributes:

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ responsemessage = ("A", markerA, 500)
/ responsemessage = ("E", markerE, 500)

/ posttrialpause = 1200
</trial>

I am trying to make sense of the code , what is the 500 for?
My IAT code has a feedback when the input is incorrect, so  I am also interested in clearly marking when there has been an error.
I would like to send a trigger for when a participant makes a wrong button press, and what they change their response to when they correct the error
since there are two types of button press , this is what I have come up with, I have not tested it yet . 
This is an example of when a participants  makes an incorrect button press such as "E", gets a feedback and then makes the correct button press of "I" 

<port markerE>
/ items =("00000111")
/ port = LPT1
/ subport = data
</port>

<port markerI>
/ items =("00001000")
/ port = LPT1
/ subport = data
</port>

<port marker EI>
/ items = ("00001001")
/ port = LPT1
/ subport = data
</port>


<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB,marker2]
/ responsemessage = ("E", markerE, 500)
/ responsemessage = ("I", markerI, 500)
/ responsemessage = ("EI", markerEI, 500)
/ posttrialpause = 1200
</trial>


Does this make any sense?





/ responsemessage = ("EI", markerEI, 500)

No, this does not make sense. "EI" is not a response, and this responsemessage will never fire.

The "500" merely designates the (minimum) duration of the stimulus; it's not really relevant in your case, because you have a /posttrialpause longer than that (1200ms). The TTL signal will remain raised for the entire duration of the postrialpause.

Unrelated, but what you'll also want to do is "turn off" the stimulus onset marker at some point, so that you get a clear separation between the onset marker and the response  markers in your recording. I.e.

<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB,marker2; 3=markeroff]
/ beginresponseframe = 1
/ responsemessage = ("E", markerE, 500)
/ responsemessage = ("I", markerI, 500)
/ posttrialpause = 1200
</trial>

with

<port markeroff>
/ items = ("00000000")
/ port = LPT1
/ subport = data
</port>
On another note, I thinks I understand the function of this 
 / stimulusframes = [1 = attributeB,marker2; 3=markeroff]
/ beginresponseframe = 1

However, now that it is included in my code, the trigger for event type no longer appears on the neuroscan graph, when the code is running, why is that the case? and how can I fix it. Thanks.





So, to clarify, when you send the marker2 trigger via your /stimulusframes, that signal will remain raised throughout the trial. This can interfere with the signals -- the response triggers -- that you send later. Hence it's normally a good idea to (1) send the event trigger (raise the signal), and then (2) turn it off (lower the signal) some time later to avoid any possible interference with the response triggers. As for it's not showing up anymore: It may be that

 / stimulusframes = [1 = attributeB,marker2; 3=markeroff]

is not raising the signal long enough. Try delaying the markeroff trigger a little longer, e.g.

 / stimulusframes = [1 = attributeB,marker2; 5=markeroff]

Hope this helps.

Hi Dave 

Thanks a lot, that is much more clear now.  
I have two more questions on this topic:
1) so with  a line  like / stimulusframes = [1 = attributeB,marker2; 5=markeroff] in my code , I no longer need to send an stimulus onset trigger right?
2)  How do I send a trigger for incorrect responses, and how can I code a trigger that will show the correct response following an incorrect response?





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
Tash - Monday, October 2, 2017
Dave - Monday, October 2, 2017
Tash - Monday, October 2, 2017
Dave - Friday, September 29, 2017
Tash - Friday, September 29, 2017
Dave - Monday, September 25, 2017
Tash - Sunday, September 24, 2017
Hi, can anyone please help. I need help on how I can code sending trigger for stimulus onset and button press for IMPLICIT ASSOCIATION TEST. I have already found a way to send trigger for event types  such as TARGET AND ATTRIBUTE THEN COMPATIBLE AND INCOMPATIBLE TRIAL .However, I have no idea how to write a code for button press
so here is an example of one trigger that I have coded and it works , it is for the event type

port settings
***********************************************************************
<port marker1>
/ items = ("00000001")
/ port = LPT1
/ subport = data

</port>

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ posttrialpause = 1200
</trial>

this trigger  "/ stimulusframes = [1 = attributeA,marker1]" marks attribute A when its on the left.



Define additional <port> elements for the response triggers e.g

<port markerE>
...
</port>

<port markerA>
...
</port>

and then "display" them via the trial's /responsemessage attributes:

<trial attributeA>
/ validresponse = ("E", "I")
/ correctresponse = ("E")
/ stimulusframes = [1 = attributeA,marker1]
/ responsemessage = ("A", markerA, 500)
/ responsemessage = ("E", markerE, 500)

/ posttrialpause = 1200
</trial>

I am trying to make sense of the code , what is the 500 for?
My IAT code has a feedback when the input is incorrect, so  I am also interested in clearly marking when there has been an error.
I would like to send a trigger for when a participant makes a wrong button press, and what they change their response to when they correct the error
since there are two types of button press , this is what I have come up with, I have not tested it yet . 
This is an example of when a participants  makes an incorrect button press such as "E", gets a feedback and then makes the correct button press of "I" 

<port markerE>
/ items =("00000111")
/ port = LPT1
/ subport = data
</port>

<port markerI>
/ items =("00001000")
/ port = LPT1
/ subport = data
</port>

<port marker EI>
/ items = ("00001001")
/ port = LPT1
/ subport = data
</port>


<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB,marker2]
/ responsemessage = ("E", markerE, 500)
/ responsemessage = ("I", markerI, 500)
/ responsemessage = ("EI", markerEI, 500)
/ posttrialpause = 1200
</trial>


Does this make any sense?





/ responsemessage = ("EI", markerEI, 500)

No, this does not make sense. "EI" is not a response, and this responsemessage will never fire.

The "500" merely designates the (minimum) duration of the stimulus; it's not really relevant in your case, because you have a /posttrialpause longer than that (1200ms). The TTL signal will remain raised for the entire duration of the postrialpause.

Unrelated, but what you'll also want to do is "turn off" the stimulus onset marker at some point, so that you get a clear separation between the onset marker and the response  markers in your recording. I.e.

<trial attributeB>
/ validresponse = ("E", "I")
/ correctresponse = ("I")
/ stimulusframes = [1 = attributeB,marker2; 3=markeroff]
/ beginresponseframe = 1
/ responsemessage = ("E", markerE, 500)
/ responsemessage = ("I", markerI, 500)
/ posttrialpause = 1200
</trial>

with

<port markeroff>
/ items = ("00000000")
/ port = LPT1
/ subport = data
</port>
On another note, I thinks I understand the function of this 
 / stimulusframes = [1 = attributeB,marker2; 3=markeroff]
/ beginresponseframe = 1

However, now that it is included in my code, the trigger for event type no longer appears on the neuroscan graph, when the code is running, why is that the case? and how can I fix it. Thanks.





So, to clarify, when you send the marker2 trigger via your /stimulusframes, that signal will remain raised throughout the trial. This can interfere with the signals -- the response triggers -- that you send later. Hence it's normally a good idea to (1) send the event trigger (raise the signal), and then (2) turn it off (lower the signal) some time later to avoid any possible interference with the response triggers. As for it's not showing up anymore: It may be that

 / stimulusframes = [1 = attributeB,marker2; 3=markeroff]

is not raising the signal long enough. Try delaying the markeroff trigger a little longer, e.g.

 / stimulusframes = [1 = attributeB,marker2; 5=markeroff]

Hope this helps.

Hi Dave 

Thanks a lot, that is much more clear now.  
I have two more questions on this topic:
1) so with  a line  like / stimulusframes = [1 = attributeB,marker2; 5=markeroff] in my code , I no longer need to send an stimulus onset trigger right?
2)  How do I send a trigger for incorrect responses, and how can I code a trigger that will show the correct response following an incorrect response?





> 1) so with  a line  like / stimulusframes = [1 = attributeB,marker2; 5=markeroff] in my code , I no longer need to send an stimulus onset trigger right?

But you _are_ sending an onset trigger aren't you? The onset trigger is marker2, I thought. Thus I'm not sure what your question is / where the confusion comes in.

> 2)  How do I send a trigger for incorrect responses, and how can I code a trigger that will show the correct response following an incorrect response?

This is not possible given how your script is set up.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search