G Mode Functions
Chapter 8
GPIB-232CT User Manual
8-10
© National Instruments Corp.
spset - Change Serial Port Parameters
Type:
Serial Port Configuration function
Syntax:
sps
et [baud] [parity] [databits]
[stopbits]
<CR>
Purpose:
You
use
spset
at the beginning of your program to set up
the GPIB-232CT serial port characteristics (baud rate, parity,
data bits, and stop bits) to those required by your serial device.
Remarks:
The
argument
baud
is a numeric string specifying the baud
rate (300, 600, 1200, 2400, 4800, 9600, 19200, 38400).
The argument
parity
is a character specifying the parity
(
e
for even,
o
for odd,
n
for none).
The argument
databits
is a character specifying the
number of data bits (7 or 8).
The argument
stopbits
is a character specifying the
number of stop bits (1 or 2).
Until you call
spset
the following characteristics are in
effect:
9600 n 8 1
meaning the baud rate is 9600 bits per second (bps), parity is
disabled, there are 8 data bits and 1 stop bit.
If you must reconfigure the GPIB-232CT's serial port, do so
only when communication with the serial port is not taking
place.
If you call
spset
without an argument, the GPIB-232CT
returns to you its current serial port configuration.