Table 11-2
RS-232 interface commands
Command Description
serial.baud = baud
serial.databits = bits
serial.flowcontrol = flow
serial.parity = parity
Set baud rate (300, 600, 1200, 2400, 4800, 9600,
19200, 38400, 57600, or 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)
2600S-901-01 Rev. C / January 2008 Return to Section Topics 11-9
Series 2600 System SourceMeter® Instruments Reference Manual Section 11: Communications Interfaces
Note that changing the serial port settings take 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 remote interface.
RS-232 programming example
Send the following commands 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 SourceMeter also uses the same settings.
Terminator
When receiving data over the RS-232 interface using the serial.read() command, the Series 2600
will terminate on any line feed character. When sending data using the serial.write() command, it
will 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 SourceMeter and the programming terminal communicate.
Choose one of the following available rates:
• 115200
• 57600
• 38400
• 19200
• 9600
• 4800
• 2400
• 1200
•600
•300