フィルターのクリア

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 Center および File ExchangeString についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by