EEG trigger question: there're some strange mark show up in eeg data file

OS (e.g. Win10): win 10
PsychoPy version (e.g. 1.84.x): 2021.2.3
What specifically went wrong when you tried that?:

I want to figure out why some strange mark that I did’nt use in the builder show up in the eeg data file.
And is there something wrong in my experiment setting?

For example,I use “99”,“21” ,‘22’ as different condition’s mark value,“99” for fixtion,"21"for participant’s correct answer,"22"for participant’s wrong answer in the builder .
But thers’re “123”,“93” in the eeg data file,I don’t know what the meaning of these strange numbers ,and they show up in the same position of one of my mark value should to present. I mean,some mark in the eeg data file show up with wrong value.This is our guess,we only check few eeg data file.This mistake exists in all eeg data files.


Code component is in “trial” roution, these marks use in the " feedback" component.

Then, we use local csv datafile created by Psychopy to calculate the right mark value to subsitute the wrong mark in the eeg data process . However ,the eeg process result is really different with our expectation,some Electroencephalogram component showing late in the final result.
What’s more, we are wondering if all mark in the eeg data file are wrong with their value and their position.

There is no alert when we run this experiment.

What did you try to make it work?: I want to kown how to correctly use the Parallel Out component.

I will add some material of eeg data file to show the mistake mark in next few weeks.

Thanks for your time and patient.I’m looking forward to your repply.If there is something not clearly expressed,please let me kown.

You’re receiving numbers that are sometimes correct, and certainly in the correct format? Then most likely the code that you’re writing to set these numbers is the problme (not the parallel port communication).

From a quick look, the code you’re using to set the value of the sendcode is only being run at the end of the Routine, so it will only have an effect on the NEXT trial not the one where you’re currently sending the trigger

But basically, you need to think carefully about the logic of the code you’re using to create your trigger codes and when it gets written

Thanks for your reply.The value of the sendcode is based on the response of participant and condition of experiment.In the ‘trials’ Rountine, there is a keyboard to received participant’s response,and a code component to compare participant’s reponses with correct answers and decide the feedback in the next Routine. I put the code that set the value of the sendcode in end of ‘trials’ Routine, becuase that I think the value set in the before Routine will pass to the begin of next Routine. Is there any problem with this logic?