Send response to EEG

Hello,

I’m trying to send the keypress response of the participant to our BrainVision EEG Recorder.
But for some reason it does not show up in the EEG.
I used the code which worked 2019 on a windows7 system (We got a new computer with windows10, the seller installed a parallel port for us), but it does not work anymore:

***Begin Experiment

total_acc = 0

***Each frame:

if(key_resp.corr == 1):
total_acc = total_acc + 1
else:
total_acc = 0
if(total_acc >= 1):
break
if len(key_resp.keys) > 0:
if key_resp.keys[0] == ‘space’:
p_port.setData(200) # send via a specific object

***End Routine

if(key_resp.corr == 1):
total_acc = total_acc + 1
else:
total_acc = 0
if(total_acc >= 1):
break

I can run the experiment, it does not break down. There are simply no response markers in the EEG file.

I can send stimulus triggers though. The only problem with them is that they don’t show up with the number I assigned them via a variable.
We have an 8 bit trigger port which is set on ‘Low active’. In the parallel port tester I set pin 2 to 9 as LOW. One bit is assigned as ‘Response’ in the Digital Port Settings and 7 bits are assigned as ‘Stimulus’. We had it this way in 2019 as we had a task with 109 stimuli and 2 response keys.

I’m happy for any suggestions or comments… There are not many responses to posts online to this type of question, so I guess it is kind of a tricky thing… which would maybe explain why there is no ready component in the Builder to send responses…

Hi all,

I found the solution.
So I set all bits as ‘Stimulus’ in the Digital Port Settings (no ‘Response’ or anything else). This made possible to send a specific trigger code from a variable for each stimulus type.

Then I did change the keypress from ‘space’ to the letter M. For some reason, the space bar does not show up in the recording, but the M does.

For some reason it does not work anymore now that I open the task again…

Any luck with this? I am also struggling a little bit. I want to easily distinguish between response and stimuli marker. Although they have different assigned numbers, they still all show up as stimulus markers. My port settings are set to the default 4 stimulus and 4 response? do those bit numbers correlate with the marker numbers? meaning my response markers have to be assigned 4-7

Hi Emily, I did not figure out how it works properly… no idea on all this