Matlab TCP Connection

Post Reply
kevin0792
Posts: 2
Joined: Fri Feb 01, 2019 4:51 pm

Matlab TCP Connection

Post by kevin0792 »

I'm trying to set up a TCP connection with MATLABfor online processing. I have the TcpIpClientMatlabV1() function supplied by BIOSEMI, but I cannot seem to get the connection started. The "TCP Connected" light never comes on the ActiView (707_lores) screen, and the tab is disabled as soon as I press "Start". Also, all boxes such as "Channels sent by TCP", and "TCP samples/channel" are blank and uneditable, so I don't know how to set them to the correct values in MATLAB. I'm trying to set up this connection on a single PC.

Thanks,
Kevin E Alexander

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

Re: Matlab TCP Connection

Post by Coen »

TCP connection is not available on all speedmodes. If the TCP tab is greyed-out during running, then you are using a speedmode where TCP is unavailable (multibox, AIB). Test with speedmode 4,5,6 or 7. Also see viewtopic.php?f=2&t=413&p=3007

Best regards, Coen (BioSemi)

kevin0792
Posts: 2
Joined: Fri Feb 01, 2019 4:51 pm

Re: Matlab TCP Connection

Post by kevin0792 »

Thanks so much! That was the problem.

zhongxu
Posts: 1
Joined: Thu Jan 17, 2019 11:19 pm

Re: Matlab TCP Connection

Post by zhongxu »

Dear All,

We just got a new active2 EEG system and we are trying to figure out how we can read in, in real time, the respiratory rhythm data and one or two EEG channel data. I know we can use the TCP/IP server in actiView and the program TcpIpClientMatlabV1in Matlab to accomplish this. However, because I am new to this, I wonder where this is a detailed step-by-step manual so that new learners can follow. I did not find it from the Internet. but If you know where to get it, please let me know and I will really appreciate.

In case we haven't had the manual ready, here are a couple of questions I wonder whether some of you could help me with (I know some of the questions may be very obvious and basic, but for a new learner, we do face there obvious basic questions ;):

1. I assume it may be easier to use the same computer to both record and read in the EEG data. A couple of threads here discussed the issues related to this one-computer setup. However, I wonder whether we can have a two-computers setup, i.e., one for EEG recording and the other for reading EEG data and presenting stimuli. If so, should I connect the two computers using a dedicated ethernet cable, or it will be ok if both computers are connected to the internet. If the latter is possible, will the speed of the data transmission be affected by the internet connection?

2. No matter one-computer or two-computer setup, should I manually set up the "receive remote port" and "remote address" in Actiview? I found I could not modify the value there. I did choose the speed mode of 4 for my eeg recording.

3. Can I read in respiratory data instead of the EEG data? I could not find the option under "TCP subset" in actiview.

4. Could someone share a snippet code so that I can learn the setup at the Matlab end, e.g., how to set up the connection and how to read data from the buffer? Even just a few lines should be very helpful.

Thank you very much for your time and help, and apologize for these basic questions.

Best,
Zhongxu

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

Re: Matlab TCP Connection

Post by Coen »

1) Both computers should be connected to the same network. The transmission speed does affect lag.

2) Select the "Sent local Port" in ActiView. Ounce the connection is established, ActiView displays the "Remote Display Port" with the same number.

3) Check the select box "Add 7 Sensors". RESP is the 5th sensor channel.

4) Download from https://www.biosemi.com/download/TcpIpC ... tlabV1.zip

Best regards, Coen (BioSemi)

Post Reply