for the reading pwm, what is the unit of the 200 in the block? because it can be tune more than 255.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Noor Amira Ilyanie
el 8 de Ag. de 2022
Respondida: Joel Van Sickel
el 9 de Ag. de 2022
0 comentarios
Respuesta aceptada
Joel Van Sickel
el 9 de Ag. de 2022
Simulink by default can tune a constant block to any value, it does not know that the input must be limited to 255 unless you specify that. However, as in the documentation, the input to this block is between 0 and 255 so you can calculate the duty cycle by n/255. So the 200 is a duty cycle of 0.78. If you pass a higher value, it probably defaults to a duty cycle of 1, or it might throw an error. It would be betst to use a saturation block or the appropriate data type to keep the range between 0 and 255 at all times.
Regards,
Joel
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Sources 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!