Shachar85
Member level 2
Hello
I'm trying to find the duration of a pulse of an incoming PWM. I'm using Simulink for that.
First I tried to use a counter to count microseconds between rising and falling trigger.
It worked great on simulation, but when I tried it on external mode (as I need this model to be),
the sample time just killed the model and the time of the model increased very slowly (0.001 seconds in the model for 1 second in reality).
Can anyone think of a way to measure pulse width? (or duty cycle)
Thank you
I'm trying to find the duration of a pulse of an incoming PWM. I'm using Simulink for that.
First I tried to use a counter to count microseconds between rising and falling trigger.
It worked great on simulation, but when I tried it on external mode (as I need this model to be),
the sample time just killed the model and the time of the model increased very slowly (0.001 seconds in the model for 1 second in reality).
Can anyone think of a way to measure pulse width? (or duty cycle)
Thank you