Basic idea here is to make transport-independent command sender/parser and a device baseclass that implements the common SCPI commands
Project description
New asyncio version. Only for Python 3.6 and above
Since all the other wrappers either require VISA binary or are not generic (and do not implement the device I need)
Basic idea here is to make transport-independent command sender/parser and a device baseclass that implements the common SCPI commands
A device specific implementation can then add the device-specific commands.
Pro tip for thos wishing to work on the code https://python-poetry.org/
## Usage
Install the package to your virtualenv with poetry or from pip
Instatiate a transport (for GPIB you will need GPIBDeviceTransport to be able to use the device helper class)
Instatiate SCPIProtocol with the transport (optional, see below)
Instantiate SCPIDevice with the protocol (or as a shorthand: with the transport directly)
Use the asyncio eventloop to run the device methods (all of which are coroutines)
Or if you’re just playing around in the REPL use AIOWrapper to hide the eventloop handling for traditional non-concurrent approach.
See the examples directory for more.
TODO
Check Carrier-Detect for RS232 transport
in the RS232 transport check getCD to make sure the device is present before doing anything. CTS can also be checked even if hw flow control is not in use.
Basically wait for it for X seconds and abort if not found
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
File details
Details for the file scpi-2.4.0.tar.gz
.
File metadata
- Download URL: scpi-2.4.0.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64afbe8e3585d8e3bfd76a33485930989515df9df1adc9b14248226673487837 |
|
MD5 | 1b32c1dbc042cf6c16c88fd4411379d9 |
|
BLAKE2b-256 | 33044128833aac5477ab5c64d0d8d4126ccb2c73e8032aa98b60b1f5f30cff1d |
File details
Details for the file scpi-2.4.0-py3-none-any.whl
.
File metadata
- Download URL: scpi-2.4.0-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5d2a8fad103736636853299f99f5d63a161f8be69d03dc2c9500cb0a3cd4e6f |
|
MD5 | 03508195297dfdad1ae9ad74d7374cf9 |
|
BLAKE2b-256 | a50160cec608185e4108827b17dbe348c8e316d57a96cdbc6309a3ac415b72b7 |