Effacer les filtres
Effacer les filtres

want to convert rotary encoder pulses into angle for DC motor

4 vues (au cours des 30 derniers jours)
yousif saffa
yousif saffa le 23 Avr 2022
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

Réponses (1)

Joel Van Sickel
Joel Van Sickel le 5 Mai 2022
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

Community Treasure Hunt

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

Start Hunting!

Translated by