Skip to main content

Implement SCPI in pure Python

Project description

python-scpi

New asyncio version. Only for Python 3.5 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 http://guide.python-distribute.org/pip.html#installing-from-a-vcs

Usage

  • Instatiate a transport
  • Instatiate SCPIProtocol with the transport
  • Instantiate SCPIDevice with the protocol
  • 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 DeviceWrapper to hide the eventloop handling for traditional non-concurrent approach.

See https://github.com/rambo/python-scpi/tree/master/examples 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.0.0.tar.gz (8.0 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.0.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scpi-2.0.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for scpi-2.0.0.tar.gz
Algorithm Hash digest
SHA256 89e02c3318e9bafecd8a7f6da369bc13a9602b8878034897bc247be23d3f7a6b
MD5 fcbbd9ce461a0b2f9106df62a6c155a2
BLAKE2b-256 f96f9b60bd9a91ac58773809b4baf8e4171aa42d6d3da1b7a6d5e49d54d56d75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scpi-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for scpi-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98b33b4266e7ac20d3714a1e47c87c2a665229f7514953376f5183afa0fe7211
MD5 0e5ccaeeaa9c93ad5a550dccc021fdaa
BLAKE2b-256 b22225f0de62cded439c977d1638a1f1f159e7e9ad96f7c06deb80b61a063391

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