Parallel Port sending incorrect codes

I am on Psychopy 2022.1.4

I have a parallel port component which I am using to send triggers for EEG use. In one experiment it is fine, I am creating a list within code and using this to send triggers, this works fine for one experiment. I am also using the code to send correct answer triggers, again this works fine in one experiment.

The issue I have is that in a similar experiment, it is sending the wrong codes. For one trial I am using 201-208 and in another I am using 20 and 10. The parallel port is sending an array of codes from 138-142 for the first block (instead of 201-208) and will send 1 or 2 for the second block (instead of 20 and 10).

I am using a parallel port component in builder to send these triggers, and it is sent to 0 after the pulse.

Is there additional code I need to put in to get this to send the correct codes? Or is it that I cannot send certain values?

I have managed to fixed this issue. I believe it might be because the code for sending correct answers in the “end routine” tab, was clashing with the hard triggered codes through the builder. The way I fixed it was by adding a second parallel port component, setting it to a start trigger of 0 (so it doesn’t trigger during the experiment) and then using that component in the “end routine” code to call upon the trigger. This meant it wasn’t using a single parallel port component, which I think was causing some overlap.