LabJack counter problem

Hi Chris,

I’m coming across a problem with the counter plugin. As it is currently written, the counter resets to 0 at the beginning of each trial. However, I think the transition between trials takes long enough that pulses can arrive between the end of one trial and the onset of the next, and so are effectively lost. This is preventing us from keeping our two programs effectively synced. Is it possible to update the counters so that they only resets at the end of an experiment rather than at the end of a trial? Or do you have a different solution to ensure that we are collecting (and accounting for) all pulses?

Thanks!
Lindsey.

Hi Lindsey,

As it is currently written, the counter resets to 0 at the beginning of each trial.

After looking at the plugin code, I think the only reason that would happen is if you stop and restart the device between trials (probably by calling “start_device_io” at the beginning of the trial and “stop_device_io” at the end). Is that the case in your experiment? If so, then if you move those actions so that the device is started and stopped just once per protocol, the counter value should be maintained.

Cheers,
Chris

This was exactly the issue- thanks!
Lindsey.