|
SpinAPI Python Wrapper
Use this wrapper to program
PulseBlaster, PulseBlasterESR-PRO, PulseBlasterDDS, and
RadioProcessor boards supported by SpinAPI.
This wrapper allows programmers to call functions
provided by the SpinAPI library (downloaded separately.)
This wrapper requires Python 3 or greater, and is
provided as-is.
Download SpinAPI Python3 Wrapper
(20230707)
Examples for PulseBlasterDDS-II, PulseBlasterESR-PRO-500,
and PulseBlaster
Examples ported to Python from SpinAPI/examples folder:
Directory
Zip
Instructions on Usage (Windows 10/11)
- Verify that SpinAPI and your SpinCore product are
functional by running a precompiled C example
executable that is installed as part of the SpinAPI
package.
- Right click the Python3 Wrapper linked above and
click "Save link as..." and save with the default
name (spinapi.py)
- Download one of the examples linked above or
create your own custom pulse program
- The Zip link downloads upon clicking, whereas
the other example links lead to a .py file which
can be downloaded by right clicking and clicking
"Save link as...". Alternatively, the contents can
be copied and pasted into your own .py file
- If developing your own pulse program, verify
that the spinapi.py Python Wrapper is imported
correctly
- There are multiple ways to run the Python
script, two of which are mentioned below:
- Example Directory
- C:\Python_examples
| - pb24_ex1.py
| - spinapi.py
- Command Prompt: If Python is included in
computer's Environment Variables Path, open up
Command Prompt, change the current directory to
the folder with the script (C:\Python_examples in
the above example directory) and run the script
with the word python or python3 before the file
name (e.g python pb24_ex1.py)
- Open with Python Interpreter: Right click
the script file, click "Open with", choose
"Python". If Python is not available, choose
"Choose another app" and navigate to the Python
Interpreter.
|