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?

Dave Tweed
184k17 gold badges248 silver badges431 bronze badges
asked Jan 4, 2013 at 10:48
\$\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.

answered Jan 4, 2013 at 18:44
\$\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\$ Commented Jan 4, 2013 at 23:09

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.