- Take the block "Counter Free-Running" (probably you are using that one or the "Counter Limited) and scale the output by a following "Gain"-Block. For this approach, the sampling time of the counters and maximum values have to be defined as well as the scaling factor.
- Use the "Ramp"-Block with variable slope followed by a "Quantizer"-Block. The values "Quantization interval" can be adjusted as well as "Sample time" (if needed).
How to implement a counter in simulink to increment in defined number of step size
75 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dear All, I would like to implement a counter in simulink to be able to increment witha defined step size as variable. Currently the counter increment in a step of ONE. I would like to increment in step of 2 or 3 or so on based on input. Kindly guide me if any of you have implemented before or applied this logic with available blockset in simulink before. Please do the needful.
0 comentarios
Respuestas (1)
Robert U
el 15 de Sept. de 2017
Hi Shwetha Mangalore,
from what I understand there are several ways to achieve what you desire. I try to sketch you two ways:
If you want to implement a variable slope of the counter depending on a time dependent input, you could build up a "simple" integrator.
Kind regards,
Robert
0 comentarios
Ver también
Categorías
Más información sobre Configure and View Diagnostics en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!