Contact US

Log In

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.

Students Click Here

TCP/IP/UDP Toolbox

TCP/IP/UDP Toolbox

TCP/IP/UDP Toolbox

I have a system that consists of a PLC that it is gonna send MATLAB some string messages and I have my MATLAB Application that is responsible to be the interface of a machine.

Using this toolbox I can already establish a connection between MATLAB and my PLC, but I cannot read the messages sent from the PLC to my MATLAB Application.

I've established the connection with the function:


because in this case my PLC is the client and MATLAB the server and I'm using the port 8000.

My question is: what do I have to do to read the string sent from my PLC to MATLAB. I've already tried the functions:


data=pnet(sockcon,'read' ,['200'], ['char'], ['network'], ['view'],'noblock');


but non of these three worked out.

Does anybody can help me?
Thanks a lot!

RE: TCP/IP/UDP Toolbox

Already found the solution. Thanks

RE: TCP/IP/UDP Toolbox

i have a problem like you. I want to cominicate with matla/simulink and a robot kuka via tcpip.i have some question about your solution...where do you find the pnet command? In the robot there is a visual basic program who send a string and receive a string...do you think it is possible to read and send data with matlab to the robot?  

RE: TCP/IP/UDP Toolbox


I am using the tcp_udp_ip toolbox with matlab 2007b.  I can't seem to get data I know is being sent to read into matlab.

I have a program that is sending udp data on a certain port ( I know this because it comes with a command line reader that can read it)  but when I setup the pnet command, I get a whole lot of nothing.

BRFE, what was your solution?  Anyone else?


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! Already a Member? Login


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