How to count number of pulses in a signal in Simulink

61 visualizzazioni (ultimi 30 giorni)
I have a signal (containing pulses) comming out of an encoder of a motor. I want to count the number of pulses present in the signal. The objective is to read the speed of the motor using encoder data. So, i am counting pulses, which i will be using to calculate the speed of motor. Please let me know How can I do this is simulink?
I used "Detect Increase" block, but it does't give me count for number of pulses. Since pulses are in large number so I can not count it manualy.

Risposta accettata

aakash dewangan
aakash dewangan il 25 Ott 2023
Modificato: aakash dewangan il 31 Mar 2024 alle 9:56
Hi,
I used 'encoder' block from 'simulink support packege for arduino'. The block is available in the versions 2021b and above.
Thanks
  2 Commenti
aakash dewangan
aakash dewangan il 31 Mar 2024 alle 9:57
Yes, It does, You need to judiciously choose the sampling time in that block.

Accedi per commentare.

Più risposte (1)

Paul
Paul il 14 Set 2021
Similar problem addressed in this link.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by