필터 지우기
필터 지우기

want to convert rotary encoder pulses into angle for DC motor

조회 수: 4 (최근 30일)
yousif saffa
yousif saffa 2022년 4월 23일
답변: Joel Van Sickel 2022년 5월 5일
I'm using an rotary encoder to read the rotation of a DC motor with gearbox
i want to use Simulink to read channel A and B convert it to angle and then adjust control to the motor
unfortunately there is no block in Simulink to do that
i had the idea to read the 2 channels positive edge into edge triggered counter but I don't know how to create the condition statement in Simulink to increment and decrement the counter

답변 (1개)

Joel Van Sickel
Joel Van Sickel 2022년 5월 5일
Hello Yousif,
this example has an implementation in Simulink for decoding a pulse stream. It's in the hall effect sensor subsystem.
You can use a switch to add a positive or negative value depending on the value's detected: https://www.mathworks.com/help/simulink/slref/switch.html
Regards,
Joel

카테고리

Help CenterFile Exchange에서 String에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by