Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue reading data from analog input module
#1
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.
For more information on possible reasons, see Serial Read Warnings.

Index exceeds the number of array elements. Index must not exceed 18902.

Error in ArCOMObject_Ain/read (line 302)
varargout{i} = typecast(uint8(ByteString(Pos:Pos+(nValues(i)*2)-1)), 'uint16'); Pos = Pos + nValues(i)*2;

Error in BpodAnalogIn/getData (line 427)
RawData = obj.Port.read(nValues, 'uint16');

Error in DMS_analog (line 522)
analog_data{currentTrial,1} = Ain.getData();

Error in run (line 91)
evalin('caller', strcat(script, ';'));

Error in NewLaunchManager>LaunchProtocol (line 754)
run(ProtocolPath);

Error while evaluating DestroyedObject Callback.


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
Reply


Messages In This Thread
Issue reading data from analog input module - by David_G - 06-15-2022, 12:45 PM

Forum Jump: