![]() |
Issue reading data from analog input module - Printable Version +- Forums (https://sanworks.io/forum) +-- Forum: Bpod (https://sanworks.io/forum/forumdisplay.php?fid=1) +--- Forum: Software (https://sanworks.io/forum/forumdisplay.php?fid=6) +--- Thread: Issue reading data from analog input module (/showthread.php?tid=3382) |
Issue reading data from analog input module - David_G - 06-15-2022 Hi Josh (and others)! I'm using an analog input module to record sniff signals, and every once in a while (~once every four hours of running the protocol), I run into the following error that crashes my protocol and requires me to start another session: Code: Warning: The specified amount of data was not returned within the Timeout period. 'serial' unable to read all requested data. I haven't been able to identify anything specific precedes this error- it feels more or less random (with different values for the index that is exceeded each time). Do you have any suggestions for how I might resolve this issue? It seems like there are several possible fixes outlined in MATLAB's serial read warnings info but I figured I should probably check here before messing around with any of those parameters. If it helps to know, I'm running v22 and am using the Java serial interface in ArCOMObject_Ain.m. Please let me know if any additional information from me would be helpful in troubleshooting this! Thanks so much, David RE: Issue reading data from analog input module - Josh - 07-18-2022 Hi David, Apologies for the late reply! If you start Bpod with the 'UseJava' argument and PsychToolbox is installed, ArCOMObject_Bpod will use Java - but the 'Ain' version won't. You need a separate modification: on line 77 of BpodAnalogIn.m, change Code: obj.Port = ArCOMObject_Ain(portString, 115200); to Code: obj.Port = ArCOMObject_Ain(portString, 115200, 'Java'); Many users have been reporting various Bpod data transfer issues with PsychToolbox on newer versions of MATLAB. Our upcoming release of Bpod console 1.65 (with optional state machine firmware v23) will automatically use MATLAB's new serialport class for r2019b or newer, with PsychToolbox as the fallback. -Josh RE: Issue reading data from analog input module - VincisLab - 07-21-2022 Hi Josh, we are experiencing the same exact issues. We tried the suggested above workaround but it did not help. Any additional suggestions, Best, Roberto |