| Contents | Index |
Before you can write or read data, both the serial port object and the instrument must have identical communication settings. Configuring serial port communications involves specifying values for properties that control the baud rate and the Serial Data Format. These properties are as follows.
Serial Port Communication Properties
Property Name | Description |
|---|---|
Specify the rate at which bits are transmitted. | |
Specify the number of data bits to transmit. | |
Specify the type of parity checking. | |
Specify the number of bits used to indicate the end of a byte. | |
Specify the terminator character. |
Caution If the serial port object and the instrument communication settings are not identical, you cannot successfully read or write data. |
Refer to your instrument documentation for an explanation of its supported communication settings.
You can display the communication property values for the serial port object s created in Serial Port Object with the get function.
get(s,{'BaudRate','DataBits','Parity','StopBits','Terminator'})
ans =
[9600] [8] 'none' [1] 'LF'
![]() | Serial Port Object | Writing and Reading Data | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |