Feeding node-red data into Matlab

1,331 views
Skip to first unread message

Nikhil Badami

unread,
Oct 25, 2015, 3:09:49 PM10/25/15
to Node-RED
Hey all. I'm working on a project that involves gathering gait data and analyzing it using Matlab. I'm using a beaglebone black and a sensortag with node-red to gather my gait data, and its working very well. I do not know, however, how to feed the data I'm getting from Node-RED into my Matlab script. Could anyone who has worked with Matlab and Node-RED together please provide some insight on how to bridge the two? Thank you very much for your help in advance.

Dave C-J

unread,
Oct 25, 2015, 3:19:34 PM10/25/15
to node...@googlegroups.com

We've used both TCP and UDP links before.

Nikhil Badami

unread,
Oct 27, 2015, 12:21:09 AM10/27/15
to Node-RED
Thanks, I think I'll try a UDP link.

sai rajesh

unread,
Jan 3, 2016, 2:34:59 PM1/3/16
to Node-RED
HI Nikhil Badami,

I am Sai Rajesh currently working on node red and Matlab i couldn't able synchronise communication between them but i can make communication between matlab to matlab and node red to nodered through tcp,mqtt,udp succesfully please could you give some suggestions i am really thankful if you could help me.

Nikhil Badami

unread,
Jan 5, 2016, 12:59:17 AM1/5/16
to Node-RED
Sai are you sure that you have used the proper port numbers and IP addresses? I found that setting up the udp connection from the Node-RED side was fairly straightforward; all you have to do is grab the UDP node and put in the port number you want as well as the IP address of the computer you are sending (or receiving) information too. Setting up the matlab end of the connection can be a bit more complicated. The good news is that there is a wealth of information available on the topic of UDP and matlab on the internet. I would highly suggest starting there as UDP can be quite confusing if, like me, you have no prior experience working with UDP in matlab. Here is a helpful link that should help you get started: http://www.mathworks.com/help/instrument/udp.html?refresh=true

sai rajesh

unread,
Jan 10, 2016, 2:28:31 PM1/10/16
to Node-RED
Hi Nikhil,

i tried many times to synchronise communication between matlab and nodered but im sorry i couldnt able to connect it...... i dont have previous knowledge about them so please i request you to upload  pictures with port number and programs in nodered  & matlab it helps me a lot i am really thankful if you could help me out.

Thanks in advance

Regards
Sai Rajesh.V

Nikhil Badami

unread,
Jan 11, 2016, 6:04:09 PM1/11/16
to Node-RED
Hi Sai,

Unfortunately, I cannot post a picture or a video. I can, however, try and explain to you something that might help. Setting up the node-red end of the UDP connection is quite simple. Just grab the correct UDP node, and put in the IP address of the machine you want to send (or receive) data from, as well as a port number. The port number can be arbitrary, but remember it for when you are trying to configure the matlab end of the connection. UDP in matlab is slightly more complicated. You need to set up an echoudp server to read from the node-red udp node, and then create a udp object to read from that server. This should be enough to set you on the right path. I would highly recommend googling "how to set up UDP in matlab" as you will find many helpful pages. Many of these pages will deal with UDP between two matlab programs, but the ideas presented there can be extended to your problem. This is how I was able to configure my UDP connection, and I'm sure you can do it too.

sai rajesh

unread,
Feb 2, 2016, 3:43:40 PM2/2/16
to Node-RED
HI Nikhil,
 Hope everything is going good for you :).Im still trying to connect nodered & matlab using UDP but still i couldn't able to connect it.can you tell me please which blocks you have used in nodered when you used as it server/client and in function block what type of program you wrote in nodered to send/recieve data.kindly help me nikhil.

Thanks in Advande
Sai Rajesh


On Sunday, October 25, 2015 at 8:09:49 PM UTC+1, Nikhil Badami wrote:
Reply all
Reply to author
Forward
0 new messages