Skip to main content

Interface with a Stanford Research Systems CG635 Synthesized Clock Generator

Project description

SRS-CG635 Synthesized Clock Generator Interface

Interface with a Stanford Research Systems CG635 Synthesized Clock Generator.

Installation

$ pip install cg635-clock-generator

Supported Features

  • Frequency control
  • Phase control
  • CMOS output levels and standards control
  • Q/*Q outputs levels and standards control
  • R232 communication

Usage

from cg635_clock_generator import CG635ClockGenerator, CG635Communication

clock_generator = CG635ClockGenerator(
        communication_type=CG635Communication.RS232,
        serial_device='/dev/ttyUSB0',
)

print(clock_generator.get_identification())

FREQ = 10e6
PHASE = 90.0

clock_generator.set_frequency(FREQ)

frequency = clock_generator.get_frequency()
print(f"Frequency is {frequency} Hz")

clock_generator.set_phase(PHASE)

phase = clock_generator.get_phase()
print(f"Phase is {phase} degrees")

Running tests on hardware

During normal development and for the CI the unit test suite is executed on a mock device using pyvisa-mock. It is also possible to run tests on real hardware connected to your system. Just set the hil flag when running tox

$ tox -- --hil

By default it will try to connect to /dev/ttyUSB0, but you can specify a different device using the --hil_serial_device option:

$ tox -- --hil --hil_serial_device /dev/ttyUSB1

Status

Currently only the RS232 communication has been tested on the device.

Documentation

For more details of the module API, check the online documentation.

Feeling like contributing?

Great! Check the Contributing Guide to get started.

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

cg635_clock_generator-1.0.2.tar.gz (387.6 kB view details)

Uploaded Source

Built Distribution

cg635_clock_generator-1.0.2-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file cg635_clock_generator-1.0.2.tar.gz.

File metadata

  • Download URL: cg635_clock_generator-1.0.2.tar.gz
  • Upload date:
  • Size: 387.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for cg635_clock_generator-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ff5dc1149fd9036dfec2a987c1ee0f8faca584302d54e80aff55ff1b4a8b8cd3
MD5 a0f2e95ba0c769df2c57e280af8c3850
BLAKE2b-256 be577e17b5a4f5c13013cafa161d538eede8229d96f78f314e791d018d6e8009

See more details on using hashes here.

File details

Details for the file cg635_clock_generator-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for cg635_clock_generator-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b526503b9874d7c5dbf6caab208a659541d45162d003efbc47ee4a35f1941401
MD5 59bfd886e2b9373dab84c5dbc306c813
BLAKE2b-256 6fe5be5091d145488bca2ae2fee2681c902996351f1cbe60837f326e868091a8

See more details on using hashes here.

Supported by

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