Package: pydwf
pydwfThis is the README ofpydwf, a Python package to control the Digilent Waveforms lineup of electronic test and measurement devices made byDigilent.It wraps all functions oflibdwf, thelow-level C libraryprovided by Digilent, in an easy-to-use, class-based Python API. Like the C library, thepydwfpackage supports Windows, Linux (Intel and ARM), and macOS. Thelibdwflibrary is automatically installed as part of Digilent'sWaveformssoftware, which can be downloaded fromhere(official link, with mandatory email harvesting) orhere(non-official link, without email harvesting).The current release ofpydwfis version 1.1.19.
It is based on version 3.20.1 oflibdwf, but it should also work with other versions.Thepydwfpackage comes with documentation and a number of ready-to-runexamplesthat demonstrate howpydwfcan be used to perform common and not-so-common tasks.Acommand-line toolis provided that can be used, among other things, to list the available Digilent Waveforms devices and their configurations.This README file contains information about the project. Readers who want to learn how to usepydwfare referred to theAPI documentation.Supported devicesThe following devices can be controlled usingpydwf:Electronics Explorer(legacy)Analog Discovery(legacy)Analog Discovery 2Analog Discovery 3Digital DiscoveryAnalog Discovery StudioDSP3340 Discovery USB power supplyAnalog Discovery Pro 3x50(3250 and 3450 models)Analog Discovery Pro 5250(a National Instruments VB-8012 rebranded as a Digilent device; Windows only)Thepydwfpackage has been extensively tested with the Analog Discovery 2, Digital Discovery, and ADP3450 devices. It should also work with the other devices listed, but these haven't been tested. If you have such a device and encounter problems, please report an issue on theGitHub issue tracker.DependenciesThepydwfpackage requires Python 3.6 or higher.In order forpydwfto work, recent versions of the Digilent Adept and Digilent Waveforms packages must be installed. These provide the C libraries thatpydwfuses to interact with devices. Generally speaking, if the Waveforms GUI application provided by Digilent works on your system, you're good to go.pydwfdepends on thenumpypackage to handle the considerable amount of data transferred between the PC and Digilent devices when performing high-speed signal generation or capture operations.Some of theexamplesdepend on thematplotlibpackage, butpydwfitself will work without it.Project hostingThe project repository and issue tracker are hosted onGitHub:https://github.com/sidneycadot/pydwf/Installation usingpipThe installable package is hosted onPyPI:https://pypi.org/project/pydwf/This allows installation using the standardpip(orpip3) tool:pip install pydwfAfter installingpydwf, the following command will show the version ofpydwfand the underlying DWF library:python -m pydwf versionAfter installingpydwf. the following command will list all Digilent Waveforms devices connected to the system and, for each of them, list the supported configurations:python -m pydwf list -cDocumentationThe project documentation is hosted onRead the Docs. The latest version can be reached via the following link:https://pydwf.readthedocs.io/en/latest/If desired, the documentation can also be installed locally after installing the package by executing the following command:python -m pydwf extract-html-docsThis will create a local directory calledpydwf-docs-htmlcontaining the project documentation in HTML format.Alternatively, a PDF version of the manual can be extracted as well:python -m pydwf extract-pdf-manualExamplesThe Pythonexamplescan be installed locally after installing thepydwfpackage by executing the following command:python -m pydwf extract-examplesThis will create a local directory calledpydwf-examplescontaining the Python examples that demonstrate many of the capabilities of the Digilent Waveforms devices andpydwf.These examples are intended as a useful starting point for your own Python scripts. See theExamples overviewfor more information.AcknowledgementsMany thanks to Digilent for making the awesome Waveforms devices, and to provide not only the very capableWaveformsGUI software, but also the cross-platform SDK on whichpydwfis based. Great work!My companyJigsaw B.V.supported the effort to makepydwf. If you need any kind of high-tech software (with or without Digilent Waveforms devices), and you’re somewhat in the vicinity of Delft, The Netherlands,give us a call.Thanks to my longtime friend Pepijn for proof-reading the documentation and providing his perspective on several issues that came up while implementingpydwf. The package is a lot better because of your help.Lastly, thanks to Petra for your patience with having all kinds of electronics equipment in the living room while developing this package (and before, and after, …). You may not share my enthusiasm for this particular hobby, but I am very fortunate that you are at least enthusiastic about my enthusiasm, if that makes sense.— SC