| Reference | Downloads | Github

How to mark reponse triggers in builder view?

TWO questions, here.

I’ve know in the 255 trigger numbers could be made in psychopy, but in my computer just 16 numbers appear (1 to 16 with a 16 pin parallel port)
How could I use over 16 numbers?

I’d like to make trigger codes in the builder view but I’m not sure.
What I first did is that making condition file, correct answers and parallel numbers with stimuli in it.

In builder view,
I designated “$port_1” on “start data” of ParallelOut Properties for trigger marks by stimuli,
and made another “code properties”.

In code properties,

I typed this.

Should I define the response in different?
I just used the same title as the key_reponse on the routine in builder view.

Thank you for reading the novice question,
and I would be appeciated to get some advice.


You don’t need to use a code component for this. Builder supports a parallel port option directly:

the value of “data” in this case (and in your code) can be any value between 0 and 255. What makes you say it only has numbers up to 16?

Ah, wait, I see that you need the code component so that your values change according to response.

OK, you certainly have an error though in your response checking. Right now your You need something like this as your if... statement:

if len(response.keys)>0 and response.corr:

That checks “was there any response at all?” and then “was it correct?”

This doesn’t affect the issue about values being limited to 16 though so you should still explain more about what you mean by that

Thank you for the advice.
I’ll try if len(response.keys)>0 and response.corr:.

And I found out why I was limited to the numbers.
It was due to EEG recorder.
I am using BrainVision recorder and I should have designated the stimulus and response triggers on the amplifier menu.
It was the binary system, so if I choose all the triggers (8) as Stimulus, I can mark trigger numbers upto 255.
The default was 4 stumulus and 4 response, which made me only use 16 (2^4).
The response triggers still left me something to understand, but I finally undetstand parallel port and I/O, I think.


I have a simple question, but rather questions about creating triggers in builder view. Unfortunately I was not able to find the answer in the manual. I created very simple experiment which including among others task of displaying images. I’d like record data while images are being displayed and also while i dont display anything (intervals). How I can create proper triggers (in one loop) in builder view? Should I set the right time? (The beginning and end of the presence of the stimulus. And the begging and end of intervals)
And what is it a start/stop data$. Is it a code? And if i want record data in two (or more) condiction I should make different one? For example. Image start in 1 s. and end in 9 s… and star/stop data$ is 1 and 0. And invervals start in 10.s. and end 18 s. For interval start/stop data$ should be for example 2 and 3?

If this is a silly question please tell me. And once again I’m sorry. I am a complete beginner…


ps. Of course I want use eeg.and send data via labjack.

You can designate the triggering time before and after the stimuli presenting time.
For example, if you designate starting time 0 for one trigger and for one stimulus, and 1 for another trigger mark and 1 for another stimulus, you can find trigger marks 0 and 1 sequentially, which distinguishes the two stimuli onsets. You should make triggers for each stimulus.
In start data, you can write the trigger numbers and 0 in the stop data.
And checkout the duration of the triggers, mostly it worked well between 0.1 to 0.3 in my cases.

Hi Nayeon,

Did the code component work? Is it possible to share it as, I will like to sent a trigger whenever the response is correct or incorrect.

Many thanks