/** This checks NOGO-Trials. It conditionally shows an error feedback message if a response is found on a NOGO-Trial. */
Experiment(){
Context(){
AssignmentGroup(){
ExperimentName = "Go- and NoGo-Response Control";
SubjectCode = "pxlab";
TrialFactor = 3;
new go = 1;
}
Session(){
Instruction(){
Text = ["GO and NOGO Response Control", " ", "Whenever a RED dot is shown then press any response button as fast as you can. Do NOT respond if a GREEN dot is shown!", " ", "Press any key now to start!"];
}
}
/* Feedback.Visible MUST be a trial argument here in order to clear the Feedback.Visible parameter for those trials where NO_EVALUATION is done. */
Trial( TrialCounter, go, Feedback.Visible, SimpleDisk.ResponseTime){
FixationMark(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 500;
}
ClearScreen:A(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 300;
}
SimpleDisk(){
Timer = go? de.pxlab.pxl.TimerCodes.RESPONSE_TIMER: de.pxlab.pxl.TimerCodes.LIMITED_RESPONSE_TIMER;
Duration = 1000;
Size = 200;
Color = go? red(): green();
}
Feedback(){
Evaluation = go? de.pxlab.pxl.EvaluationCodes.NO_EVALUATION: de.pxlab.pxl.EvaluationCodes.CHECK_NOGO;
ResponseParameter = Trial.SimpleDisk.ResponseCode;
CorrectCode = de.pxlab.pxl.ResponseCodes.TIME_OUT;
FalseText = "Don\'t respond!";
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 2000;
Visible = 0;
}
ClearScreen:B(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 500;
}
}
// Command line assignments
AssignmentGroup();
}
Procedure(){
Session(){
Block(){
Trial( ?, 0, 0, ?);
Trial( ?, 1, 0, ?);
}
}
}
}