LibTiePie SDK Matlab

Matlab logo

The Matlab LibTiePie package creates easy to use objects in Matlab to control the instruments.


MatlabLibTiePie: Matlab package for using LibTiePie0.6.4for Matlab 8 = 2012b and higher (Windows/Linux)26.27 kB download
Matlab examples for MatlabLibTiePie0.6.5for Matlab 8 = 2012b and higher (Windows/Linux)18.84 kB download


The MatlabLibTiePie package download contains a directory named +LibTiePie, with all required files in a specific directory structure. The parent directory of the +LibTiePie directory must be in the Matlab path (or must be the current directory).


To install MatlabLibTiePie, create a directory structure such as C:\TiePie\+LibTiePie. To temporarily add C:\TiePie to the Matlab path, execute addpath C:\TiePie. To permanently add C:\TiePie to the Matlab path, use file → set path → add folder → save → close, or in Matlab 2012b+'s ribbon menu Environment → Set Path.

libtiepie.dll (or .so), libtiepie.h and libtiepiematlab.h must also be in the Matlab path. You can copy them to the C:\TiePie directory already added to the Matlab path.


To install LibTiePie copy the +LibTiePie directory to ~/Documents/MATLAB/ (By default ~/Documents/MATLAB/ is in the Matlab path).

LibTiePie may require a newer version of the GNU C++ library than is provided by Matlab. In that case, loading the library using LibTiePie = LibTiePie.Library Matlab will report an error like:

There was an error loading the library "libtiepie"
/usr/local/MATLAB/R2012b/bin/glnxa64/../../sys/os/glnxa64/ version 'GLIBCXX_3.4.15' not
found (required by /usr/lib/

This can be solved by letting Matlab use the systems GNU C++ library by:

  • cd /usr/local/MATLAB/R<release>/sys/os/glnxa64
  • sudo unlink

C compiler for Matlab

In order to use LibTiePie, Matlab requires a C compiler. For 32 bit versions of Matlab for Windows platforms default a C compiler is installed along with Matlab. 64 bit versions of Matlab for Windows platforms and Matlab versions for Linux and OS X platforms are not supplied with a C compiler. When no suitable compiler is installed, Matlab will produce an error like:

Error using loadlibrary (line 254)
A 'Selected' compiler was not found.  You may need to run mex -setup.

This can be solved by installing a suitable compiler. More information can be found on the Matlab Supported and Compatible Compilers page.


It is recommended to import the enumerated constants for LibTiePie to be able to use them for example as MM.STREAM instead of LibTiePie.Enum.MM.STREAM. You can do this by executing: import LibTiePie.Enum.*

Now you can open the library as follows: LibTiePie = LibTiePie.Library

Search for devices: LibTiePie.DeviceList.update()

Open the first oscilloscope: scp = LibTiePie.DeviceList.getItemByIndex(0).openOscilloscope()

Open the first function generator: gen = LibTiePie.DeviceList.getItemByIndex(0).openGenerator()

Matlab will show which properties and methods can be used on each object.


List of available example scripts: