![Keithley 2651A Reference Manual Download Page 104](http://html1.mh-extra.com/html/keithley/2651a/2651a_reference-manual_661729104.webp)
Section 2: General operation
Model 2651A High Power System SourceMeter® Instrument Reference Manual
2-82
2651A-901-01 Rev. A / March 2011
RS-232 interface commands
Command Description
serial.baud = baud
Set baud rate (300, 600, 1200, 2400, 4800, 9600, 19200,
38400, 57600, 115200)
serial.databits = bits
Set number of bits (7 or 8)
serial.flowcontrol = flow
Set flow control:
serial.FLOW_NONE
(no flow control)
serial.FLOW_HARDWARE
(hardware flow control)
serial.parity = parity
Set parity:
serial.PARITY_NONE
(no parity)
serial.PARITY_EVEN
(even parity)
serial.PARITY_ODD
(odd 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
•
9600
•
600
•
57600
•
4800
•
300
•
38400
•
2400
•
19200
•
1200