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 call:
$ uv run poe test_hil
By default it will try to connect to /dev/ttyUSB0, but you can specify a different
device using the --hil_serial_device option:
$ uv run poe test_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
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 cg635_clock_generator-1.1.0.tar.gz.
File metadata
- Download URL: cg635_clock_generator-1.1.0.tar.gz
- Upload date:
- Size: 420.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea0d97f8d2c7a735bf959bb037e7c7b72d6862b5f2497e48924bd4e1fbbed796
|
|
| MD5 |
e43a38a41fa08c35e9a5272a9025f456
|
|
| BLAKE2b-256 |
e2e4599ea06704cd9c68869d28085e22c1819f443cd65ad167789e87042c99fb
|
File details
Details for the file cg635_clock_generator-1.1.0-py3-none-any.whl.
File metadata
- Download URL: cg635_clock_generator-1.1.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83306803a38c14aeb38403be413b4b2a04dd48608d8a24b7867ea9fe6d54a856
|
|
| MD5 |
8d6aecc26d7ca34ade1eed20ca67f180
|
|
| BLAKE2b-256 |
75bf5aeab4739aa3fed872b75ac3260f5f19ff0b8be976b434166f673859b3ad
|