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.5.1.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

scpi-2.5.1-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scpi-2.5.1.tar.gz
  • Upload date:
  • Size: 16.9 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.1.tar.gz
Algorithm Hash digest
SHA256 d8df239f7adb475cc01e7da508a1b85a94310a9c0a887972d48a4851d7f45dbc
MD5 b8b596746c88fe55470bcdc050a64295
BLAKE2b-256 e374f257c33c3f1e130deb6ee3731cd0cbba23dd71159ba2234d24109491179f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scpi-2.5.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d6f5a1ff1a906ccf9015605fd1c0711387b2dd5083c2e176ba5c85c88c7b23d
MD5 d767a4cd0852777653bcbf5c42013b66
BLAKE2b-256 8abe996b784364963c011d1891f47697964be667b14a10340cf068e1d5968023

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page