How can I display bool values while executing a program on a connected device?
23 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I've come up with a simple Simulink function block to check whether an input signal QtyToCheck is within range of LowerBound and UpperBound. If the signal is within range, the output QtyInRange should be true (1). If not, the output should be false (0).
I put in some display blocks (from the Simulink/Sinks library) to check the functionality of this code. I then connected it to a TI Delfino F28379D Launchpad and executed the program in "monitor and tune" mode. However, it seems like the display blocks are unable to display boolean values. As you can see, the display blocks show 0 even when the outputs should be true (1).
When I change the outputs of the relational operators (<, >) as well as the AND block to fixdt(1,16) instead of boolean, the display blocks suddenly start outputting the expected values.
My question is, is there any way to get the display blocks to show boolean values? The reason I'd prefer to stay away from fixdt(1,16) is the time potentially wasted in the conversion step. It may be that I'm mistaken and this conversion doesn't in fact contribute significantly to the overall execution time, in which case please let me know!
Alternatively, if I can't use the Simulink/Sinks/Display block to display a boolean, is there a different block I can use? I also tried using the Simulink/Dashboard/Display block with no success.
Thanks!
0 comentarios
Respuestas (1)
Reshma Nerella
el 28 de Ag. de 2020
Hi,
As per my understanding you want to find if the value is within the limits and get the boolean output.
To check if the value is within the limits, you can use INTERVAL TEST block and modify the Output data type for the block as boolean to get required output.
1 comentario
Ver también
Categorías
Más información sobre Schedule Model Components 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!