Instrument driver package for the CS580 Voltage Controlled Current Source from Stanford Research Systems
Project description
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()
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file srsinst_cs580-0.2.tar.gz.
File metadata
- Download URL: srsinst_cs580-0.2.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c07dbe218522360125b0276e62f5042b6b810a69c07bc52a133169f514e91c8
|
|
| MD5 |
55b1a8634e16b72f8f44ee4ce975675f
|
|
| BLAKE2b-256 |
fd5301fd4f66ba1bbc32e254569531dc64f0c862932186b0e969caa71e92c702
|
Provenance
The following attestation bundles were made for srsinst_cs580-0.2.tar.gz:
Publisher:
python-publish.yml on thinkSRS/srsinst.cs580
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
srsinst_cs580-0.2.tar.gz -
Subject digest:
4c07dbe218522360125b0276e62f5042b6b810a69c07bc52a133169f514e91c8 - Sigstore transparency entry: 1208209982
- Sigstore integration time:
-
Permalink:
thinkSRS/srsinst.cs580@0d77b93ccd1affed0278285182dcc60332c0660b -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/thinkSRS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0d77b93ccd1affed0278285182dcc60332c0660b -
Trigger Event:
release
-
Statement type:
File details
Details for the file srsinst_cs580-0.2-py3-none-any.whl.
File metadata
- Download URL: srsinst_cs580-0.2-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f94f13b4e5be79f331d90b6cf44a3d66c8069ad7614be3cec05fad63c919c56b
|
|
| MD5 |
8767ed5838ecd67b4549850fc884c859
|
|
| BLAKE2b-256 |
d4648c3001d862a52c9baa7e114ca1f2d8524b51c8d747fb52e66f28e35a0d4a
|
Provenance
The following attestation bundles were made for srsinst_cs580-0.2-py3-none-any.whl:
Publisher:
python-publish.yml on thinkSRS/srsinst.cs580
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
srsinst_cs580-0.2-py3-none-any.whl -
Subject digest:
f94f13b4e5be79f331d90b6cf44a3d66c8069ad7614be3cec05fad63c919c56b - Sigstore transparency entry: 1208210046
- Sigstore integration time:
-
Permalink:
thinkSRS/srsinst.cs580@0d77b93ccd1affed0278285182dcc60332c0660b -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/thinkSRS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0d77b93ccd1affed0278285182dcc60332c0660b -
Trigger Event:
release
-
Statement type: