Page 1 of 1

UDP

Posted: 29 Aug 2018, 16:18
by adamr
I am trying to use the Cursor task and get the results into Matlab Simulink. Currently I am using the app connector and a upd receive block within simulink, but when I attach a display to the upd receive there are multiple rows of data which fluctuate between 9 rows and 18 rows. What do these rows mean and am I doing something incorrectly. I appreciate any help I can get with this.
Thanks

Re: UDP

Posted: 22 Oct 2018, 11:36
by mellinger
As explained in the AppConnector documentation, data consists of the name of each BCI2000 state, followed with its value, plus the name of each data entry in the application module's input, followed with its value.

You might be slow in receiving AppConnector data, and thus you may sometimes receive data from two blocks rather than one.
You less likely to experience this kind of problem when selectively asking BCI2000 to send only the information you are interested in, rather than all available data. This can be done using BCI2000 Watches, as described here:
https://www.bci2000.org/mediawiki/index ... ector#NOTE

-J├╝rgen

Re: UDP

Posted: 04 Dec 2018, 06:46
by adamr
So, I have used the readudp.m and also the regular expression to get Signal(0,0) XXXXX and Signal(1,0) XXXXX into matlab, but these only get displayed in the command window and I would like to bring then into Simulink. I have tried using a function block in simulink, but get an error of the 'udp' class does not support code generation.
Appreciate any help,
Thanks

Re: UDP

Posted: 04 Dec 2018, 10:39
by mellinger
This information may help to solve your simulink problem:
https://ch.mathworks.com/matlabcentral/ ... n-simulink