Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to log data with rotary encoder module in certain computer
Hi Josh,

I am currently building a second rig but I have encountered an issue with the rotary encoder module. I use the same Bpod version (v1.61), protocol code as well as hardware connections but for unknown reasons, the rotation data couldn't be logged/retrieved properly in the new rig. There aren't any errors when I run the task but the rotation data retrieved has a value of 0 for the "nPositions" field and the "Positions" and "Times" fields are empty. I have tried to use StreamUI() to launch the GUI and it can display the encoder position perfectly fine so I think this issue has something to do with the logging or retrieving. I have also tested the new module hardware itself (along with the new cables) by using it in my first rig and it can log and retrieve the data with no problem so the SD card is not broken or loosely attached. I have also tried to update the Bpod software to v1.64 but this issue didn't go away. 

Do you have any idea what could be causing this and do you have any solutions? Just FYI, both computers are using Windows 10 Enterprise, and the first rig has i7-4790 + 16 GB RAM whereas the second rig has i7-3770 + 24 GB RAM. 

Thank you,
So now I have got a third computer and the rotary encoder module was working okay. I suspect that the SD card might not be logging the data properly due to the Dell data encryption program that was running on the second computer (which can't be removed due to university IT policy).
Hi Tin,

I don't think a PC-side encryption program would be able to affect microSD card operation - the Teensy 3.5 microcontroller interfaces directly with the card without involving the PC operating system.

Is it possible that the problematic PC has multiple copies of Bpod in the MATLAB path? The RotaryEncoderModule class that MATLAB is using could be an old copy that somehow has path priority. To determine this, run "which RotaryEncoderModule" at the MATLAB prompt, and ensure that the path to RotaryEncoderModule.m matches the repository you installed when upgrading to v1.64.

You can also try a command line test of microSD capture and readback to constrain the problem. At the MATLAB command prompt,
R = RotaryEncoderModule('COM3'); % Where 'COM3' is the correct port
% -- Move the rotary encoder to capture some position data
Data = R.getLoggedData;
clear R

Please let me know if these yield any results!

Forum Jump: