Updating Variables Faster than the Frame Rate with a Biopac System

If this template helps then use it. If not then just delete and start from scratch.

What are you trying to achieve?:

I am currently programming an experiment that uses a Biopac hand dynamometer. I have coded the experiment so that the current force that the participant is squeezing the dynamometer is presented on the screen and updated every frame. However, the frame rate of my monitor (60 Hz) is far less than the sampling rate of the Biopac. I would like to collect data at the sampling rate of the Biopac, even though I understand that not all values will be presented onscreen.

My specific question is do folks have experience collecting variables at higher sampling rates than the frame rate of their monitors using custom python code, particularly with Biopac systems. If so, it would be great to see an example of how to implement this.

Alternatively, if I get a monitor with a super fast frame rate (like a video gaming monitor) would this solve my problem and allow me to collect at higher than 60 Hz?

Ha, this is exactly the issue that I am also running into. Hoping that anyone has looked at this.

I’m guessing you’re presenting the measurement by storing it to some variable and setting the value of a textbox to be that variable? You could try writing the data to a list using the Each Frame tab of a code component, but this may still be limited by the time it takes to draw to the screen and therefore iterate the frame counter. The fastest solution then is probably to initialise a new “thread” at the beginning of the experiment and run the measurement getting code within that thread, meaning it won’t have to wait until PsychoPy draws the frame to start on the next measurement.

You can find info on threading here: