Adding a continually running clock and a trial link clock

Hello,

I am recording reaction time, and what I would like is that every time a participant puts in a response (i.e., they hit Z or M) I would like the reaction time clock to reset. I have tried using the Clock.reset code, but to not avail.

The purpose of the first part of this script is that the participant is presented with a word and they must decide whether the word is a real or fake. They do this by clicking either the letter Z if it is fake or the letter M if it is real. I want the reaction time from the moment the ‘word’ appears to the moment they click their response. I currently get this, however, the time is continuous, the clock does not reset. What I need is both, a continuous clock and a trial running clock. Is this at all possible?

Thank you!

Ho do you display the stimulus and how do you measure the reaction time?

If you do it entierly in the builder, this should be pretty straight forward:

One routine. On that routine one text component and one keyboard component. Make a loop around that routine and provide it with a condition file. Feed the words and correct answers from that file into the components.
One iteration of the loop will display one word. The clock of the keyboard component (reaction time) will reset every iteration of the loop.

If you do it differently (with a code component), you might want to share how you do it.

1 Like

Thank you for you reply, but I believe that code is needed for this. If I find out the answer then I will for sure post this on here.

What version of PsychoPy are you using. There was a keyboard RT bug in a recent version which should be fixed in 2024.1.4.

Hi Wakecarter,

The version that I am using is 2024.1.1. I have however just updated it to .4.

The reaction time is working fine, I just want two times, one where the clock is continually running and one where the clock resets itself after every trial.

Thanks!