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.3.0.tar.gz (15.6 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.3.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scpi-2.3.0.tar.gz
  • Upload date:
  • Size: 15.6 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

Hashes for scpi-2.3.0.tar.gz
Algorithm Hash digest
SHA256 db1fbe35507ce693558cdf6437afc99ede069715b974282136f3fa78ee2f3205
MD5 b59b3a4eca2a7615620de8cf67b29214
BLAKE2b-256 3a9334194a8ebcf9297f0dfa5869ee0da90c736b761dc595f5c8eab4529e1373

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scpi-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.5 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

Hashes for scpi-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78dabd130cae9837ccc9334be73f47367553ecfbdf03029fad7c0a962ea6cbc5
MD5 0b080b9115c924e88035910535b33641
BLAKE2b-256 df2e5ce64afbf4657b4333a806a8f21f6f17a3bcd65802a2b91723d4db9ef361

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