srsinst.cs580
srsinst.cs580 is a Python package to control
Stanford Research Systems (SRS) CS580 Voltage Controlled Current Source.
Installation
You need a working Python 3.7 or later with pip installed.
To install srsinst.cs580 as an instrument driver, use pip from the command line:
python -m pip install srsinst.cs580
Use srsinst.cs580 as instrument driver
from srsinst.cs580 import CS580
cs580 = CS580('serial', 'COM3')
cs580.check_id()
# Configure
cs580.config.gain = '1uA' # 1 uA/V gain
cs580.config.isolation = 'float' # floating output
cs580.config.shield = 'return' # inner shield to return
cs580.settings.voltage = 10.0 # 10 V compliance limit
cs580.settings.current = 1e-6 # 1 uA DC current
# Enable output
cs580.config.output = True
# Check status
print(cs580.get_status())
print('Overload:', cs580.status.overload)
# Disable output and reset
cs580.config.output = False
cs580.reset()
See test_cs580.py for a full set of examples excercising all of the CS580 commands and methods.
CS580 is built on srsgui.
Components
| Attribute | Class | Description |
|---|---|---|
cs580.config |
Configuration |
Gain, input, speed, shield, isolation, output |
cs580.settings |
Settings |
DC current, compliance voltage |
cs580.setup |
Setup |
Audible alarms |
cs580.interface |
Interface |
IDN, token mode, operation complete |
cs580.status |
Status |
Overload, status registers, error codes |
Remote interface
The CS580 communicates via RS-232 at a fixed 9600 baud, 8-bit, no parity, no flow control. Isolated connectivity to GPIB, RS-232, and Ethernet is available through the SX199 Optical Interface Controller (not yet implemented in this driver).
Running the integration tests
The test suite exercises every driver command and method against a live CS580 over RS-232.
pytest must be installed:
pip install pytest
Connect the CS580 to the PC via RS-232, then run:
pytest -v -s tests/ --port COM3
Replace COM3 with the actual COM port. The -s flag is required so the
confirmation prompt is visible in the terminal.
If --port is omitted you will be prompted to enter the port interactively.
Either way, a confirmation prompt is shown before any commands are sent to the
instrument, giving you a chance to verify the connection first.
Note: These tests require physical hardware. All 98 tests should pass against a normally functioning CS580. Unexpected failures most likely indicate a driver issue rather than an instrument fault.
Metadata
Release files for srsinst.cs580 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| srsinst_cs580-0.2.3.tar.gz | 15.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| srsinst_cs580-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.2 kB
Release files / srsinst_cs580-0.2.3.tar.gz
| Download URL | srsinst_cs580-0.2.3.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c431beda847f3ed3509caeaa1e9d69102ba97f5811f12f14be89079c162e0540
|
|
BLAKE2b-256 checksum How to use checksums |
a4b1012b794c14db78f105d090944ce6f2c09f51ecf258f0fc61f4b9e79d1e6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.
Transparency logRelease files / srsinst_cs580-0.2.3-py3-none-any.whl
| Download URL | srsinst_cs580-0.2.3-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18f09fc85537d22ec86b1d8132601ef6027834ab5f376c02418ce4e7c0006fb2
|
|
BLAKE2b-256 checksum How to use checksums |
91d5d95e4d191efe73ef6224f1797bc6b924ef3e78e4cfbc14e0944082df5d92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.
Transparency log