We are administering the Color Word Stroop Task with Keyboard Responding on Inquisit 6. Using the serial port, we would like to deliver a signal to our EEG system at stimulus presentation and when the participant responds correctly or incorrectly. A snippet of the signals can be found below:
//1 for congruent
<port congruent>
/ port = COM12
/ subport = data
/ items = ("00001111")
</port>
//2 for correct responses
<port correct>
/ port = COM12
/ subport = data
/ items = ("10000000")
</port>
//3 for incorrect responses
<port incorrect>
/ port = COM12
/ subport = data
/ items = ("11000000")
</port>
I've used the same signals for other tasks and port.correct always appears. However, with the Stroop Task, port.correct only shows up sometimes, even though the answer is correct. On the other hand, port.incorrect always appears when the participant responds incorrectly on the task. Here is the script that I am using to deliver these signals to our EEG system through the Stroop task:
<trial redcongruent>
/ontrialbegin = [
values.congruency = 1;
]
/ pretrialpause = 200
/ stimulustimes = [0=redcongruent, redreminder, greenreminder, bluereminder, blackreminder,congruent]
/ correctresponse = (parameters.keyred)
/ validresponse = (parameters.keyred, parameters.keygreen, parameters.keyblue, parameters.keyblack)
/ correctmessage = true(port.correct,0)
/ errormessage = true(port.incorrect,0)
/ errormessage = true(x, 400)
/ontrialend = [
if (trial.redcongruent.responsetext == "D"){
values.responseCategory = "red";
} else if (trial.redcongruent.responsetext == "F"){
values.responseCategory = "green";
} else if (trial.redcongruent.responsetext == "J"){
values.responseCategory = "blue";
} else if (trial.redcongruent.responsetext == "K"){
values.responseCategory = "black";
};
//summary data:
list.responses.appenditem(trial.redcongruent.correct);
list.responses_congruent.appenditem(trial.redcongruent.correct);
if (trial.redcongruent.correct) {
list.latencies.appenditem(trial.redcongruent.latency);
list.latencies_congruent.appenditem(trial.redcongruent.latency);
}
]
</trial>
You can see port.congruent being delivered at stimulustimes. While port.correct and port.incorrect are delivered through correctmessage and errormessage. Is there a reason why port.correct is only delivered for SOME correct responses, but not others? If so, how could I change this script so that port.correct is delivered for ALL correct responses.