![background image](http://html2.mh-extra.com/html/keithley/2657a/2657a_reference-manual_4007750113.webp)
Model 2657A High Power System SourceMeter® Instrument Reference Manual
Section 2: General operation
2657A-901-01 Rev. B/December 2012
2-89
Changes to a serial port setting take effect when the command is processed. Any response
messages generated after the commands are processed will be sent with the new settings. If
command messages are being queued (sent before the 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 2657A 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 2657A and the programming terminal communicate.
Select one of the following available rates:
•
115200
•
9600
•
600
•
57600
•
4800
•
300
•
38400
•
2400
•
19200
•
1200
The factory-selected baud rate is 9600.
Both the Model 2657A and the other device must be configured for the same baud rate. Make sure
the device connected to the Model 2657A RS-232 port can support the selected baud rate.
Data bits and parity
The RS-232 interface can be configured to send/receive data that is 7 or 8 bits long using even, odd,
or no parity.
Flow control and signal handshaking
Signal handshaking between the controller and the instrument allows the two devices to communicate
to each other regarding being ready or not ready to receive data.
The RS-232 interface provides two control lines (RTS and CTS) for this purpose. The instrument will
assert the RTS signal when it is admissible for the PC to transmit to the instrument. It will only send
information to the PC when the clear to send (CTS) signal is asserted by the PC.
Содержание 2657A
Страница 3: ......