Using DLL+MATLAB to send stimulations to Acquisition Server

Obtaining data from various hardware devices
Post Reply
Psemaj
Posts: 2
Joined: Sun Mar 22, 2015 10:32 am

Using DLL+MATLAB to send stimulations to Acquisition Server

Post by Psemaj »

Using the send external stimulations example, I built a DLL with the intention of having something that could be easily integrated into projects for sending external stimulations to the OpenViBE acquisition server. I first built a console application to test it was working correctly and that the stimulations were being sent to the server.

I then built it into a DLL and used the loadlibrary function in MATLAB to load it. However, when calling the function to send the stimulation, it is not being picked up by the Acquisition Server. I know that the DLL is fine because other function calls within it are fine. Does anyone know why the send stimulation function would not be working when called through MATLAB? I've implemented C wrappers and tested with both 32 and 64 bit versions of MATLAB.

Does anyone know how to resolve this? Or have alternative suggestions on how to send external stimulations (efficiently) from MATLAB to the acquisition server?

TIA.

jtlindgren
Posts: 775
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Using DLL+MATLAB to send stimulations to Acquisition Ser

Post by jtlindgren »

Hello Psemaj,

you could try testing if you can use the same mechanism from Matlab to send data to some other, non-openvibe test application using the same technique. One possible problem could be if Matlab and OpenViBE Acquisition Server are compiled against different versions of boost, or with different bitness (32 vs 64).

In the future we should have a TCP/IP based way to receive stimulations in a more robust manner, but we don't have it yet. If the external stims connection is not working, currently the recommended way is to send stims as hardware tags to the amplifier (e.g. serial port -> amp -> acquisition server) if possible.


Best,
Jussi

Post Reply