Send String with SCI transmit
Mostrar comentarios más antiguos
Anyone here know how to send a string with the SCI Transmit block.
I tried creating an embedded matlab function that simply returns
y = uint8('fu');
but the SCI transmit block spits out an error message saying it only accepts scalars. Is there any way to send a vector? Only other option i have is to create a function that runs a for loop and transmits each character at a time but i don't want to do this if a tool for this already exist. The matlab embedded tools cost so much I can't believe they don't have a simple serial send command that can accept an array of numbers or characters.
Respuesta aceptada
Más respuestas (4)
Walter Roberson
el 21 de Feb. de 2011
0 votos
2 comentarios
Daniel
el 22 de Feb. de 2011
Walter Roberson
el 22 de Feb. de 2011
Guess you aren't interested in the solutions I researched, then, since I don't KNOW from personal experience that they will work.
Daniel
el 22 de Feb. de 2011
0 votos
Daniel
el 22 de Feb. de 2011
0 votos
1 comentario
Joris Lambrecht
el 8 de Jul. de 2013
Editada: Joris Lambrecht
el 8 de Jul. de 2013
In many cases you can use the ASCII Encode block with C2000 devices (with minor modification). Locate the file "asciiencode.c" in "<MATLABROOT>\toolbox\rtw\targets\xpc\target\build\xpcblocks" and comment out the line as follows: //#include <windows.h>
Daniel
el 22 de Feb. de 2011
0 votos
1 comentario
Kamal Joshi
el 26 de Nov. de 2015
any luck with this Daniel ?
Categorías
Más información sobre String en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!