Borrar filtros
Borrar filtros

I want to ask how can I send uint8 data through my serial communication?

1 visualización (últimos 30 días)
Hi!
I have built a serial communication between simulink and my Microcontroller evaluationboard. In the first step I hve sent a constant 1 and it worked pout, but in the next step I want to send uint8 data. In the next steps I want to extend my model step by step sending more data.
The To instrument block and query instrument block are expecting double and this causes me a problem. How can I manage this? I would be glad for a hint.
Thanks and greetings

Respuestas (1)

Chad Gilbert
Chad Gilbert el 3 de Jul. de 2013
You can convert numeric values in MATLAB to uint8 using the "uint8" command. See "help uint8" for more info. Or, you may need to use the "typecast" command. See "help typecast" for more info.
  1 comentario
Walter Roberson
Walter Roberson el 3 de Jul. de 2013
"To Instrument Block" and "Query Instrument Block" are part of Simulink, so perhaps the procedure is different?

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by