EasyManuals Logo

Tektronix KEITHLEY 2600B Series User Manual

Tektronix KEITHLEY 2600B Series
834 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #514 background imageLoading...
Page #514 background image
Series 2600B System SourceMeter® instrument Reference Manual Section 9: TSP command reference
2600BS-901-01 Rev. F/August 2021 9-193
serial.read()
This function reads available characters (data) from the serial port.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
data = serial.read(maxchars)
data
A string that consists of all data read from the serial port
maxchars
An integer that specifies the maximum number of characters to read
Details
This function reads available characters from the serial port. It does not wait for new characters to
arrive. As long as maxchars is less than 200 characters, all characters that are received by the serial
port (before the serial.read() command is executed) are returned. If too many characters are
received between calls to this function, the RS-232 buffers overflow and some characters may
be lost.
Call this function as many times as necessary to receive the required number of characters. For
optimal performance, use a small delay between repeated calls to this function.
The data returned is the raw data stream read from the port. No characters, such as control
characters or terminator characters, are interpreted.
If you attempt to use this function when the serial port is enabled as a command interface, a settings
conflict error is generated.
Example
data = serial.read(200)
print(data)
Read data from the serial port.
Output:
John Doe
The above output indicates that the string "John Doe" was read
from the serial port.
Also see
serial.write() (on page 9-193)
serial.write()
This function writes data to the serial port.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
serial.write("data")
data
A string representing the data to write

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tektronix KEITHLEY 2600B Series and is the answer not in the manual?

Tektronix KEITHLEY 2600B Series Specifications

General IconGeneral
BrandTektronix
ModelKEITHLEY 2600B Series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals