Filter löschen
Filter löschen

Warning in reading data from serial port.

1 Ansicht (letzte 30 Tage)
Sabarinathan Vadivelu
Sabarinathan Vadivelu am 17 Aug. 2013
I'm trying to read a single character 'A' from serial port, But it is issuing a warning always.
CharVar = fscanf(SerialObj,'%c',1);
Warning: Unsuccessful read: A timeout occurred before the Terminator was reached or SIZE values were available.

Antworten (1)

Jan
Jan am 17 Aug. 2013
The message seems to tell you, that Matlab did not receive a character and/or the corresponding terminator before the timeout occurred. So it might be useful to show us the command used for opening the port (especially the timeout value) and explain, if you are sure, that the character has been sent in the required period of time.
  3 Kommentare
Sabarinathan Vadivelu
Sabarinathan Vadivelu am 19 Aug. 2013
Bearbeitet: Sabarinathan Vadivelu am 19 Aug. 2013
This is my code. In this part,
CharVar = fscanf(SerialObj,'%c',1);
The warning was issued. But I receive the character in MATLAB. The main Problem is the delay.
Jan
Jan am 25 Aug. 2013
What about increasing the value of the TimeOut?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by