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

Reason this release was yanked:

TCPTransport broken when already in eventloop

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.5.0.tar.gz (16.8 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.5.0-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scpi-2.5.0.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.13

File hashes

Hashes for scpi-2.5.0.tar.gz
Algorithm Hash digest
SHA256 211b23cad0902b33e09d039c7ff2b7e46e337673253f741626a30acc12e3ed26
MD5 1665bc35ffbb0495e9735892db74758d
BLAKE2b-256 cf4e65f67df0f49348f87dbc5666583e72f7422828bd32c26be230aa56b1f361

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scpi-2.5.0-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.13

File hashes

Hashes for scpi-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6a2fb28c98c537033edf370c011b464c715a71f149a7fa48dabb2db08de2c71
MD5 1f52f3b609493bd9eb6ce9cb2aad9f07
BLAKE2b-256 e34f5dc23ac88e630739d57783cedfecb71b43a3b1f48e3d4c3185c41ebacafb

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