Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

srsinst_cs580-0.2.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

srsinst_cs580-0.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

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

Hashes for srsinst_cs580-0.2.tar.gz
Algorithm Hash digest
SHA256 4c07dbe218522360125b0276e62f5042b6b810a69c07bc52a133169f514e91c8
MD5 55b1a8634e16b72f8f44ee4ce975675f
BLAKE2b-256 fd5301fd4f66ba1bbc32e254569531dc64f0c862932186b0e969caa71e92c702

See more details on using hashes here.

Provenance

The following attestation bundles were made for srsinst_cs580-0.2.tar.gz:

Publisher: python-publish.yml on thinkSRS/srsinst.cs580

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for srsinst_cs580-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f94f13b4e5be79f331d90b6cf44a3d66c8069ad7614be3cec05fad63c919c56b
MD5 8767ed5838ecd67b4549850fc884c859
BLAKE2b-256 d4648c3001d862a52c9baa7e114ca1f2d8524b51c8d747fb52e66f28e35a0d4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for srsinst_cs580-0.2-py3-none-any.whl:

Publisher: python-publish.yml on thinkSRS/srsinst.cs580

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page