Community news, upcoming events and general discussions
Threads: 31 Posts: 81
Get technical support from the community
Threads: 1115 Posts: 6155
Threads: 16 Posts: 58
Tell us how to make XDK better!
Threads: 35 Posts: 117
Share and discuss community member projects
Threads: 53 Posts: 256
I'm trying to understand the udp-example and read the data in Matlab. In the xdk-code I entered the IP of my computer and the port 55056. If I create a udp object in Matlab with these properties and try "fopen" and "fscanf", I don't get any values.
Is this a problem with Matlab or am I doing something wrong with the xdk?
Kind regards, Johannes
I know, that I need to be in the same Wi-Fi network and I'm sure, I am.
If I create a UDP object with u=udp('RemoteHost', RemotePort), which is my PC's IP and the port 55056, I can connect the object to the host with fopen(u).
According to mathworks homepage, " A = fscanf(obj) reads data from the instrument connected to obj, and returns it to A. The data is converted to text using the %c format."
A = fscanf(obj)
I can check, if data is available with u.BytesAvailable, but this is always 0. I dont't know, why that happens.
Is there an othe way to recieve, display and store the upd-Data from the xdk on my PC?