13: LPT library function reference Model 4200A-SCS Parameter Analyzer
13-32 4200A-901-01 Rev. C / February 2017
ksprcv
This command reads data from an instrument connected to a serial port.
Usage
int ksprcv(int port, char terminator, double timeout, int
rcvsize, int *rcv_len, char *rcv_buffer);
The RS-232 port to be used; only port 1 is supported; this port must have been
configured for communications with the
command
The ASCII terminator for the received data; this character is used to terminate the
The serial communications timeout: 0 to 600 s
The physical buffer size; this is used to control the maximum number of characters
that can be read from the device
The actual number of characters read from the device; this value is returned to the
ksprcv command by the software
A character array in which to store the data returned from the serial device
Also see
kspcfg (on page 13-28)
kspsnd
This command sends a device-dependent command to an instrument attached to a RS-232 serial port.
Usage
int kspsnd( int port, double timeout, int cmdlen, char *cmd);
The RS-232 port to be used; only port 1 is supported; this port must have been
configured for communications with the
command
The serial communications timeout: 0 to 600 s
The number of characters that you are sending out the serial port
The character array containing the data that you want sent out of the serial port
Also see
None