The Python bindings for LibTiePie provide an easy to use interface to control the instruments.
Contents
Installation
Windows
To install the Python bindings for LibTiePie and examples on Windows:
- Install the Python bindings by executing pip install python-libtiepie
- Download the python-libtiepie examples.
- Unpack them using an extractor.
- Connect your USB oscilloscope.
- Run an example by executing e.g. python OscilloscopeBlock.py
Linux
To install the Python bindings for LibTiePie and examples on Linux:
- Ensure that LibTiePie is installed.
- Install the Python bindings by executing sudo pip install python-libtiepie
- Download the python-libtiepie examples.
- Unpack them using an extractor like e.g. unzip.
- Connect your USB oscilloscope.
- Run an example by executing e.g. python OscilloscopeBlock.py
Examples
List of available example scripts:
- Generator example
- Arbitrary waveform generator example
- Generator burst example
- Generator gated burst example
- Generator triggered burst example
- I2C DAC example
- Device list example
- Oscilloscope example
- Oscilloscope segmented trigger example
- HS3/HS4 combined oscilloscope example
- SureConnect oscilloscope example
- Oscilloscope triggered by generator example
- Oscilloscope streaming data example
Download python-libtiepie source code and examples (zip)
Download python-libtiepie source code and examples (tar.gz)
The python-libtiepie source code and examples are also available on GitHub.
Trouble shooting
When you get an error like one of the following errors:
Python 2.7
tiepie@tiepie-pc:~/TiePie> python OscilloscopeBlock.py Traceback (most recent call last): File "OscilloscopeBlock.py", line 11, inimport libtiepie ImportError: dynamic module does not define init function (initlibtiepie)
Python 3
tiepie@tiepie-pc:~/TiePie> python3 OscilloscopeBlock.py Traceback (most recent call last): File "OscilloscopeBlock.py", line 11, inimport libtiepie ImportError: dynamic module does not define module export function (PyInit_libtiepie)
Python tries to load the LibTiePie SDK as Python module.
To avoid that, make sure libtiepie.so doesn't exist in the script's directory.