Hi Ali,
You can log rotary encoder data to the microSD card from the control software, or from the state machine.
Using the MATLAB software, in the RotaryEncoderModule class, see the startLogging(), stopLogging() and getData() methods (documented here).
I'm not sure what has and hasn't been implemented in the latest version of PyBpod - that's a great question for the PyBpod slack channel.
-Josh