Skip to main content

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


Download files

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

Source Distribution

scpi-2.2.0.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

scpi-2.2.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file scpi-2.2.0.tar.gz.

File metadata

  • Download URL: scpi-2.2.0.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for scpi-2.2.0.tar.gz
Algorithm Hash digest
SHA256 28b1baf48f0cb175c4a5ebfe7821fca1e2af1517e56fc04ac2a20212817646f6
MD5 a4fb351c422a8a3ce8862502dda7eaff
BLAKE2b-256 abec48487b82123ce11aeac6afdac925cf3bce308c13022c369558ac9e07c398

See more details on using hashes here.

File details

Details for the file scpi-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: scpi-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for scpi-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5a9608c7fe42299a7061c8613519db53f96843aab79c65133a44e0e792c91eb
MD5 043700a23e3f04ab97015ad6e69f592f
BLAKE2b-256 d66339569278c5b78b505f41816b11a3df584e47ecb7d4d796b255fa72a168bd

See more details on using hashes here.

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