Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Matlab Instrument Control Toolbox (UDP)

Matlab Instrument Control Toolbox (UDP)

Have an issue connecting an Ultra-wideband radio which broadcasts position tables to 3 other similar radios, using UDP. Aside from this, basically all I am trying to do is create a socket on my local host (PC) with a port of 19842, bind to it, then connect this socket to the radio's ip address and port (19843). The radio creates a UDP socket and binds it to this port (19843). The PC's UDP socket is used to send/receive UDP commands to the radio's port ID 19843. I have functional code using the free pnet function, but I am looking to replace this with the Instrument Control Toolbox. My code in pnet:

% Create and bind to the socket
% If the socket is already created then close it first
if exist('sock')

%creates the socket and binds it to port 19842
sock = pnet('udpsocket', 19842);

%connects radio_ip_addr and port 19843 to the above socket

There is other code as well (this is actually in a gui). We have a function behind a gui button for connection (where we specify the radio_ip_addr value and send a connect command via socket). This code works with pnet, but not very efficiently. This is why we are looking for an alternative. Using the ICT I was thinking something like this:

if exist('sock')

sock = udp('radio_ip_addr', 'RemotePort', 19843, LocalPort',19842);


simple as that (or so I thought). Matlab kicks me an error message stating that the network address is already in use. Please help me if you can. Thanks

Also, for a little info on the pnet commands used, see --

Also, to see a full version of the GUI code, see the pdf attachment

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


White Paper: Agile Product Engineering and Improved Product Outcomes
Today’s product development cycle is fraught with difficulties. Increased demands for complex functionality and reduced product development windows cause engineering teams to borrow practices from the IT industry, swapping outdated serial workflows for a more flexible and collaborative design method known as Agile Product Engineering. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close