0
\$\begingroup\$

I'm doing a project based on an incremental encoder based position sensor. In order to validate this, I'm trying to read square wave signals from a function generator (since an optical encoder produces square wave pulses as output). Is there any method to read voltage signals from a signal generator using MATLAB Simulink software?

\$\endgroup\$
1

1 Answer 1

1
\$\begingroup\$

You could use the Matlab Data Acquisition Toolbox, if you have access to that.

Alternately, a digital storage oscilloscope may be about to capture data in some kind of spreadsheet format that you could easily import into Matlab.

You will need to set the sampling rate high enough to avoid aliasing. For a conventional rotary encoder, that the critical time is about 0.5 ms, so you need to sample at 0.25 ms or less (4000 Hz). You'll need to ensure your data capture system is properly configured to capture these events. For your optical encoder, the sample time will be related to the maximum speed you are trying to capture and the number of positions in the encoder.

\$\endgroup\$
1
  • \$\begingroup\$ Of course, even with the data acquisition toolbox, you need some sort of interface to get the data from the encoder into your computer, and no plan for that has been described. \$\endgroup\$ Jan 4, 2013 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.