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.1.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.1-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scpi-2.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 13b57b63a18d04d0743d2e23fb5fbf86e73e7d66e9c88b6de6bf7eb39239b80c
MD5 96dfb12c350b61e7466f8fee50645a96
BLAKE2b-256 80894c7cf21787dc70895dc264e4c931e36508bfd629fde593c4d31b39596fc7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scpi-2.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c62ece941e63018b8201def83722fef20f76f021cc36b0525569c94e7256f948
MD5 ad45e6b76b2b9e9afad2bb849b201b38
BLAKE2b-256 13d223e2177436614272fc94b6a393e37cca62f106e805fe4c18b9b9e5867101

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