Skip to content

2. Getting Started

Martin edited this page Jun 13, 2024 · 24 revisions

2. Getting Started

Installation

It is recommended to use the latest release. You find it here:

Latest telease on github

It is best to download the tar.gz for linux and the zip version for Windows.

linux

Prerequistes: SDL2 must be installed if you want to use the graphic functions of the DLL. If it is not installed, open a command prompt:

'''bash sudo apt-get install libsdl2-2.0-0 libsdl2-ttf-2.0-0 libsdl2-image-2.0-0 '''

Unzip the downloaded archive into a folder of your choice and open a command prompt in this directory. You will need the administrator password to install the drivers.

bash install.sh

[!NOTE] Windows:

No installation is necessary. The DLL must only be accessible from the respective application. In the simplest case, the DLL contained in the archive is copied to the directory where the application is stored.

You may also register the DLL in the system. The DLL is then accessible system-wide and a copy of the DLL in the respective start folder of the application is not necessary.

C und C++

The /share/C folder of the archive contains sample files for the C programming language.

You will find further information in the readme.md file.

Python

The /share/C folder of the archive contains sample files for Python. The functionalities for the examples are all contained in a single file: multiDaq.py. This file is the central hub for communication with the DLL.

multiDaq.py requires numpy. If numpy is not installed, install it within a command prompt:

pip install numpy

If the DLL is not accessible system-wide, the DLL must first be copied to the working directory.

Lauch example

Open a command prompt in the /share/python folder of the archive. You may start for example

demo1.py:

python demo1.py

Some examples require the matplot library. (install within command prompt: 'pip install matplotlib')

windows:

If the DLL is not accessible system-wide, the DLL must first be copied to the working directory.

copy ..\..\bin\biovisionMultiDaq.dll .

Matlab/Octave

The /share/C folder of the archive contains example files for Matlab. The functionalities for Matlab are available in source and must first be translated.

Windows require the Mingw64 C compiler for Matlab, which can compile the required mex file from the code. Under Linux a GCC compiler is installed by default.

windows: install Compiler

To install the compiler, use the Add-Ons menu.

  • On the MATLAB Home tab, in the Environment section, click Add-Ons > Get Add-Ons.
  • Search for MinGW or select from Features.

If you only have the MinGW compiler installed on your system, the mex command automatically chooses MinGW. Go to the next step. However, if you have multiple C or C++ compilers, use mex -setup to choose MinGW.

mex -setup

Compile Mex file

This step is the same for matlab and Octave. Change in matlab/octave to the share/matlab folder of the unpacked archive. The file translate.m to compile the source file is there and the environment is ok.

translate

Now you should be able to start the demo scripts there.

Windows:

If the DLL is not accessible system-wide, the DLL must first be copied to the working directory. Open a command prompt in the /share/python folder of the unpacked archive and type:

copy ..\..\bin\biovisionMultiDaq.dll .

Clone this wiki locally