Unexpected error: A timeout occurred during the write operation..
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hussain Ahmad
el 20 de Abr. de 2019
Respondida: Walter Roberson
el 20 de Abr. de 2019
while sending the data serially i am experiencing a unexpected error:
Error using serial/fprintf (line 156)
Unexpected error: A timeout occurred during the write
operation..
Error in VSigTX (line 28)
fprintf(SendData, '%s',data);
how to remove the error as the sending matrix is a very lagre matrix of about 6400000x1
0 comentarios
Respuesta aceptada
Walter Roberson
el 20 de Abr. de 2019
Increase the serial output buffer size and also send less in one fprintf.
Renegotiate the protocol with the other side so that there is a line terminator from time to time: at present you send all the lines without any breaks unless your data just happens to contain newline.
If your data is binary rather than line oriented then you should be using fwrite instead of fprintf, and you should probably also be using a binary transfer protocol like zmodem or Kermit because serial is not a reliable protocol. Or configure SLIP or PPP or similar over the serial link and use rcp or ftp to copy data.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre String Parsing 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!