Sending a conditional parallel port trigger breaks experiment

OS (e.g. Win10): Win10

PsychoPy version (e.g. 1.84.x): 2022.1.3

What are you trying to achieve?:
I am trying to send a trigger code to a parallel port when a word stimulus is displayed on screen, 20 if a word has been seen, 10 if it has not. The parallel port is attached to a BioNex box.

What did you try to make it work?:
I am representing my stimuli set using two arrays, where index i corresponds to the word in one array and whether the word has been seen or not in the second array.

So my arrays would be like:
words = [“word1”, “word2”]
testOldNew = [“new”, “old”]

My parallel port component in builder view is this:


What specifically went wrong when you tried that?:
When I run this, I get the trigger code appearing in BioLab, then my experiment gets stuck on a grey screen forever. It does not send any error codes.

1 Like

Hi There,

if you experiment is stuck on a gray screen I wonder if something else in the routine is also preventing the experiment from progressing - please may you share your psyexp file?



Sure thing, here it is.

MemoryTask.psyexp (121.2 KB)

In the testing trial component, if you disable the the p_port components or start them with a duration instead of a condition, the experiment works as intended.

Thanks a ton!

Here is the entire folder, which should be able to run as is (6.7 MB)

ok yes that does run fine my end - which routine is it where the gray screen happens?


I think the zip file I sent had that code disabled, sorry!

So it happens in the second phase of the experiment, in the TestingTrial component.

If you run this (7.6 MB)
, press q to skip the first phase.
After the “In this phase of the experiment…” screen, words will start appearing again. If I press ‘f’ or ‘j’, that is where the gray screen happens.

I’ve been trying to follow the code described in this post: Send trigger (biosemi actiview) for every key press - Builder - PsychoPy.