Serial Port Communication Parameters
You should configure the serial port object to match your instrument's communication configuration,
which you typically set with its front panel.
Port
Select the port to associate with the serial port object and the instrument.
BaudRate
Select the baud rate of the serial port object.
DataBits
Select the number of data bits used to transfer data to and from the instrument.
At least seven data bits are required to transfer ASCII characters.
Eight data bits are required to transfer binary data. Five and six bit data formats
are used for specialized communications equipment.
Terminator
Select the character(s) used to terminate commands written to or read from the instrument.
- CR - A carriage return is used.
- LF - A line feed is used.
- CR/LF - A carriage return followed by a line feed is used.
- LF/CR - A line feed followed by a carriage return is used.
When performing a formatted write operation, all occurrences of \n are
replaced with the terminator. When performing a formatted read operation, one of the ways
the operation completes is when the terminator is read.
You can also use the terminator to generate a bytes-available event when the
BytesAvailableActionMode parameter is set to terminator.
Parity
Select the type of parity checking.
- None - Parity checking is not used.
- Even - The number of mark bits (1's) in the data is counted, and the
parity bit is asserted or unasserted to obtain an even number of mark bits.
- Odd - The number of mark bits in the data is counted, and the
parity bit is asserted or unasserted to obtain an odd number of mark bits.
- Mark - The parity bit is asserted.
- Space - The parity bit is unasserted.
Parity checking can detect errors of only one bit.
FlowControl
Select the data flow control (handshaking) method.
- None - Data flow control is not used.
- Hardware - Hardware handshaking is used.
- Software - Software handshaking is used.
Hardware handshaking typically utilizes the Request to Send (RTS) and Clear to Send (CTS)
pins to control data flow. Software handshaking uses control characters (Xon and Xoff)
to control data flow.
StopBits
Select the number of bits used to indicate the end of data transmission.
- 1 - One stop bit is used.
- 2 - Two stop bits are used.
- 1.5 - The stop bit is transferred for 150% of the normal time used
to transfer one bit.