Keithley 2651A Reference Manual page 104

High power system sourcemeter instrument
Hide thumbs Also See for 2651A:
Table of Contents

Advertisement

Section 2: General operation
RS-232 interface commands
Command
serial.baud = baud
serial.databits = bits
serial.flowcontrol = flow
serial.parity = parity
Changing the serial port settings takes effect when the command is processed. Any response
messages generated after processing these commands will be sent with the new settings. If
command messages are being queued (sent before these commands have executed), the new
settings may take effect in the middle of a subsequent command message, so care should be
exercised when setting these attributes from the RS-232 interface.
RS-232 programming example
The programming example below illustrates how to set the baud rate to 9600 with no flow control:
serial.baud = 9600
serial.flowcontrol = serial.FLOW_NONE
Sending and receiving data
The RS-232 interface transfers data using 7 or 8 data bits, 1 stop bit, and no, even, or odd parity.
Make sure the device you connect to the Model 2651A also uses the same settings.
Terminator
When receiving data over the RS-232 interface the command interface terminates on line feeds. A
line feed is appended to all output messages when the RS-232 interface is being used as a command
interface.
Sending data using the serial.write() function does not append a terminator. Be sure to append
the appropriate terminator to the message before sending it.
Baud rate
The baud rate is the rate at which the Model 2651A and the programming terminal communicate.
Select one of the following available rates:
115200
57600
38400
19200
2-82
Model 2651A High Power System SourceMeter® Instrument Reference Manual
Description
Set baud rate (300, 600, 1200, 2400, 4800, 9600, 19200,
38400, 57600, 115200)
Set number of bits (7 or 8)
Set flow control:
serial.FLOW_NONE (no flow control)
serial.FLOW_HARDWARE (hardware flow control)
Set parity:
serial.PARITY_NONE (no parity)
serial.PARITY_EVEN (even parity)
serial.PARITY_ODD (odd parity)
9600
600
4800
300
2400
1200
2651A-901-01 Rev. A / March 2011

Advertisement

Table of Contents
loading

Table of Contents