Model 4200A-SCS Parameter Analyzer Reference Manual
Section 13: LPT library function reference
4200A-901-01 Rev. C / February 2017
13-29
Details
Port 1 must not be allocated to another program or utility when using the ksp (Keithley Serial Port)
commands.
•
The databits, parity, stopbits, and flowctl settings must match those on the instrument or device
that you wish to control.
•
Using a flow control setting of 0 may result in buffer overruns if the device or instrument that you
are controlling has a high data rate.
•
If you use a flow-control setting of 2 (hardware), you must make sure that the RS-232 cable has
enough wires to handle the RTS/CTS signals.
Example
int status;
.
.
.
status = kspcfg(1, 19200, 8, 1, 1, 1);/* port 1, 19200 baud,
8 bits, odd parity,
1 stop bit, and
xon-xoff flow ctl */
This example uses
kspcfg
to set port 1 to 19200 baud, 8 data bits, odd parity, 1 stop bit, and XON/XOFF
flow control.
Also see
None
kspdefclr
This command defines a device-dependent character string sent to an instrument connected to a serial port.
Usage
int kspdefclr(int
port
, double
timeout
, double
delay
, int
buffsize
, char *
buffer
);
port
The RS-232 port to be used; only port 1 is supported; this port must have been
configured for communications with the
kspcfg
command
timeout
The serial communications timeout (0 to 600 s)
delay
The amount of time to delay after sending the string to the serial device (0 to 600 s)
buffsize
The length of the string to send to the serial device
buffer
A character string that contains the data to send to the serial device