Questions about timing
Posted: 29 Jan 2015, 18:52
I'm curious if anyone can explain the finer points of the timing involved with the Process function and BCI2000.
Background:
I've developed a new Source Module that connects EMG electrodes to our system via USB input. The block size of our Source Module *must* be set to 20 in order for it to function. Our electrodes record at 2000 Hz, effectively setting the sampling block of the source to 10 ms.
The problem:
There's a gradually-increasing delay in the entire system - but this delay only begins once I hit "Start" to run the protocol. (There is no delay after I hit "Set Config".) The degree of the delay during the run depends on what Signal Processing Module I put with our Source Module.
Attempted solutions to date:
My initial reaction is that there are two likely sources of errors: the Source Module and our Signal Processing Modules. I believe I've ruled out the Signal Processing module as the source of the gradually-increasing delay, as the delay exists even when I pair the Source Module with the DummySignalProcessing module. Moreover, we've never had any issues with our Signal Processing modules before with this. So all signs point towards my new Source Module.
From what I understand, the Source Module is effectively clocking the BCI2000 system at a rate of 1000 Hz, which seems like it might overload the software. (I'm not sure why this would only be an issue once I hit "Start".) However, I've tried to change both the sampling rate and the block size with varying (unsuccessful) results. If I increase (or decrease) the sample block size, I'll get something that looks like a half square-wave, half actual-EMG-signal - it seems to not copy everything over from our hardware/USB-input correctly. I'm unsure if the sample block size of 20 is something that's hard-wired into our electrode / USB system. If I decrease the sampling rate, BCI2000 incorrectly speeds up the time (i.e. 2 s window of source signal -> zooms through in only 1 s).
If anyone has experience dealing with this kind of problem - or any crazy ideas to try - I'll listen to anything at this point!
Thanks!
Background:
I've developed a new Source Module that connects EMG electrodes to our system via USB input. The block size of our Source Module *must* be set to 20 in order for it to function. Our electrodes record at 2000 Hz, effectively setting the sampling block of the source to 10 ms.
The problem:
There's a gradually-increasing delay in the entire system - but this delay only begins once I hit "Start" to run the protocol. (There is no delay after I hit "Set Config".) The degree of the delay during the run depends on what Signal Processing Module I put with our Source Module.
Attempted solutions to date:
My initial reaction is that there are two likely sources of errors: the Source Module and our Signal Processing Modules. I believe I've ruled out the Signal Processing module as the source of the gradually-increasing delay, as the delay exists even when I pair the Source Module with the DummySignalProcessing module. Moreover, we've never had any issues with our Signal Processing modules before with this. So all signs point towards my new Source Module.
From what I understand, the Source Module is effectively clocking the BCI2000 system at a rate of 1000 Hz, which seems like it might overload the software. (I'm not sure why this would only be an issue once I hit "Start".) However, I've tried to change both the sampling rate and the block size with varying (unsuccessful) results. If I increase (or decrease) the sample block size, I'll get something that looks like a half square-wave, half actual-EMG-signal - it seems to not copy everything over from our hardware/USB-input correctly. I'm unsure if the sample block size of 20 is something that's hard-wired into our electrode / USB system. If I decrease the sampling rate, BCI2000 incorrectly speeds up the time (i.e. 2 s window of source signal -> zooms through in only 1 s).
If anyone has experience dealing with this kind of problem - or any crazy ideas to try - I'll listen to anything at this point!
Thanks!