Unexpected error: A timeout occurred during the write operation..
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Walter Roberson
2019 年 4 月 20 日
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で String Parsing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!