[SOLVED]Real time GSR analysis

Post Reply
Abramovici
Posts: 4
Joined: Tue Dec 03, 2013 2:02 am

[SOLVED]Real time GSR analysis

Post by Abramovici » Tue Dec 03, 2013 2:06 am

Hello,

This might have already been answered, but I've recently started a project where I will be using galvanic skin response data. Since I will only have access to the equipment in the future, I'm trying to prepare some other code that I will need.

I was wondering if the labview program provided offers a way to access the GSR data in real time in c++. I couldn't find any information on this.

Thank you for the help

Daniel
Last edited by Abramovici on Fri Dec 20, 2013 4:44 am, edited 1 time in total.

Coen
Site Admin
Posts: 980
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Re: Real time GSR analysis

Post by Coen » Tue Dec 03, 2013 12:49 pm

The provided acquisition program is open-source and written in LabVIEW. Real-time access to GSR (and all other) data is straight forward in LabVIEW. GSR data is not easily accessible in another language than LabVIEW.

The standard acquisition program supports streaming the data by TCP/IP to another computer (or a different program on the acquisition computer). A C++ client can be made to access the data semi real-time (search the forum for "TCP/IP")

Best regards, Coen (BioSemi)

Abramovici
Posts: 4
Joined: Tue Dec 03, 2013 2:02 am

Re: Real time GSR analysis

Post by Abramovici » Thu Dec 19, 2013 12:20 am

Hello Coen,

I tried following your advice and using the active2 code I have made my own code in c++ to acquire the GSR data.

However, I am running into some issues when my program reads for a long time.

If I try using a buffer the same size as Actiview (336 when sending 7 channels, 16 samples) about half the channels have a reading of 0. What is interesting though is that 6 channels have the correct reading (the same number shown in Actiview), 1 channel has a reading of around twice that value and followed by about 7 channels with 0 on them. This restarts and begins with normal readings again. When I try using only the first 6 readings, I note that they are all the exact same value. The program stops collecting data after about 1 minute (not consistent).

If I use a smaller buffer size in my application, actiview starts to lag behind and ultimately stops collecting data (error 5001).
If I use a larger buffer size, it stops working even faster.

My application runs at around 30 Hz, so it shouldn't be an issue of trying to read faster than the biosemi can read.

EDIT:
Looking at some old posts in the forum, I see that It can be a problem if the client application cannot keep track with the Actiview Client. I want to know, is the rate of sending packets trough Actiview fixed? Or is there a way to change it? Or is it possible to know the rate? That way I could make it so my program fetches data at around the same rate, even if it doesn't use it as fast.

Abramovici
Posts: 4
Joined: Tue Dec 03, 2013 2:02 am

Re: Real time GSR analysis

Post by Abramovici » Fri Dec 20, 2013 4:42 am

Managed to solve the issue. If anyone crosses this problem, I made my program acquire data at around 150hz, with a buffer size the same as the one provided in actiview. This made the arrows on the bottom right side of actiview follow seamlessly and the program can run without interruptions and without missing data.

Daniel

Post Reply