Differences
This shows you the differences between two versions of the page.
| test-and-measurement:guides:waveforms-sdk-getting-started [2021/12/08 09:39] – [Getting Started with the WaveForms SDK] Álmos Veres-Vitályos | test-and-measurement:guides:waveforms-sdk-getting-started [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Getting Started with the WaveForms SDK ====== | + | ====== Getting Started with WaveForms SDK ====== |
| <WRAP group> | <WRAP group> | ||
| WaveForms SDK is a set of tools provided within the WaveForms installation that are used to develop custom software solutions that use Digilent Test and Measurement devices. The WaveForms SDK API is available in several programming languages, making it easy to use across many different platforms. | WaveForms SDK is a set of tools provided within the WaveForms installation that are used to develop custom software solutions that use Digilent Test and Measurement devices. The WaveForms SDK API is available in several programming languages, making it easy to use across many different platforms. | ||
| Line 35: | Line 35: | ||
| * macOS: **/ | * macOS: **/ | ||
| - | For other examples, check: [[test-and-measurement: | ||
| </ | </ | ||
| ---- | ---- | ||
| Line 636: | Line 635: | ||
| < | < | ||
| <script src=" | <script src=" | ||
| + | |||
| + | Remember, that any submodule (the protocol folder in this case) also needs initialization: | ||
| + | < | ||
| + | <script src=" | ||
| </ | </ | ||
| ---- | ---- | ||
| - | ===== Testing | + | ==== Testing ==== |
| <WRAP group> | <WRAP group> | ||
| Copy your module folder (WF_SDK in this case) into the project directory, then create a new Python script. Import the necessary modules, then use your functions to control the Test & Measurement device. | Copy your module folder (WF_SDK in this case) into the project directory, then create a new Python script. Import the necessary modules, then use your functions to control the Test & Measurement device. | ||
| Line 646: | Line 649: | ||
| **Note: ** //The example using the oscilloscope and the waveform generator won't work on devices without analog I/O capability (Digital Discovery).// | **Note: ** //The example using the oscilloscope and the waveform generator won't work on devices without analog I/O capability (Digital Discovery).// | ||
| + | |||
| + | **Note: ** //Name your test scripts " | ||
| </ | </ | ||
| Line 719: | Line 724: | ||
| ---- | ---- | ||
| + | ==== Installing the Package ==== | ||
| + | <WRAP group> | ||
| + | Once you completed the package, you might want to install it, like other Python packages and use it on new projects as well. To do so, you must create some additional files in the project folder. | ||
| + | |||
| + | First, exclude the test scripts from the final package. Create a file named **MANIFEST.in**, | ||
| + | < | ||
| + | |||
| + | The installer needs the list of dependencies to install your package. Specify this list on a file called **requirements.txt**: | ||
| + | < | ||
| + | setuptools==58.1.0 | ||
| + | wheel==0.37.1</ | ||
| + | |||
| + | Finally, create a **README.md** file with the description of your package, then create the installer. The installer is the file named **setup.py**, | ||
| + | <code python> | ||
| + | from setuptools import setup | ||
| + | |||
| + | with open(" | ||
| + | long_description = f.read() | ||
| + | |||
| + | setup( | ||
| + | name = " | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | url = " | ||
| + | | ||
| + | ) | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP group> | ||
| + | Once the necessary files are created, open a terminal, go to the project folder and install your package with the following command: | ||
| + | < | ||
| + | |||
| + | Alternatively, | ||
| + | < | ||
| + | |||
| + | **Note:** //Use " | ||
| + | </ | ||
| + | ---- | ||
| + | |||
| + | ===== Other Programming Languages ===== | ||
| + | <WRAP group> | ||
| + | Realizing the same package in other programming languages is also possible. To check the C++ version of the package and some test programs, follow [[https:// | ||
| + | </ | ||
| + | ---- | ||
| ===== Next Steps ===== | ===== Next Steps ===== | ||
| <WRAP group> | <WRAP group> | ||

