Hi,
I am using the 8 channel analog module with Bpod State Machine R2 to control optical stimulation.
According to the description for Waveplayer, the maximum sample size is 1M.
However, with the current setup, I get the following error when the waveform size is set to be anything bigger (>) than 499997:
Error using serial/fwrite (line 199)
Unsuccessful write: The number of bytes written must be less than or equal to OutputBufferSize-BytesToOutput.
Error in ArCOMObject_Bpod/write (line 293)
fwrite(obj.Port, ByteString, 'uint8');
Error in BpodWavePlayer/loadWaveform (line 329)
obj.Port.write(['L' WaveIndex-1], 'uint8', nSamples, 'uint32', WaveBits, 'uint16');
Error in Airpuff_v4 (line 104)
W.loadWaveform(3, Pulse20Hz');
Error in run (line 91)
evalin('caller', strcat(script, ';'));
Error in NewLaunchManager>LaunchProtocol (line 707)
run(ProtocolPath);
Error while evaluating DestroyedObject Callback.
Only Ch1 and Ch2 of the output Module are currently in use, and the sampling rate is around 44k.
The protocol runs as long as the sample size of those waveforms are set to be less than (<=) 499997.
Do you know what could be causing this issue with the waveform size and how to increase it to reach 1M? Thanks!
Best,
Miao