Borrar filtros
Borrar filtros

'terminator ' 'LF'

14 visualizaciones (últimos 30 días)
Nikolaos
Nikolaos el 25 de Jun. de 2012
Hello Matlab community !
I would like your help with this line
% Create object series
s1 = serial ( 'COM9' , 'BaudRate' , 9600, 'terminator' , 'LF' );
That means that , COM 9 opens , the baudrate (bits per second ) is 9600 but what about the terminator LF ? How can I use it to terminate my program ?
When i run my program i recieve this :
"Warning: A timeout occurred before the Terminator was reached."
In a few words i would like to know which is the use of that Terminator (LF).
Thanks a lot in advance ,
Nick K.

Respuestas (1)

Matt Kindig
Matt Kindig el 25 de Jun. de 2012
The 'terminator' character is an ASCII character (in this case, ASCII char 10) that MATLAB looks for from the serial port to indicate that transmission ended. Based on your error, it appears that LF is not the correct terminator for your serial device. I might try 'CR', the other typical terminate character, or consult the documentation from your particular hardware device.
  1 comentario
Walter Roberson
Walter Roberson el 25 de Jun. de 2012
Note: not the entire transmission, just that particular transmission (such as a "line")

Iniciar sesión para comentar.

Categorías

Más información sobre Use COM Objects in MATLAB en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by