File Exchange

image thumbnail

TCP/IP Blocks for Simulink

version 1.0.0.0 (23.2 KB) by Chetan Jadhav
These server and client blocks can be added to Simulink model to exchange data between computers.

7 Downloads

Updated 03 Jun 2004

No License

The TCP/IP blocks contain a server block and a client block. These are implemented using C MEX S-function and Winsock2. Among the four files, matser.dll is the server implementation and matcli.dll is the client implementation. server.mdl and client.mdl are the examples Simulink model files.

Copy the matser.dll and server.mdl on one computer and copy matcli.dll and client.mdl on another computer. Enter port number in port parameter of server S-function mask and server name or IP address and port number in parameters of client S-function mask. First start server, Simulink will not respond as the server goes in to listing mode. Then run the client on other computer. Once connected both server and client model will start exchanging data.

When using TCP/IP blocks in your model, copy and paste corresponding blocks from example files to your model. Alternately, S-function block from Simulink Library Browser can also be used in conjunction matcli.dll or matser.dll.

Comments and Ratings (13)

Issopui

Plz Chet could you take some of your precious time and answer Dietz question your model isn't working in Matlab 2015b better yet I have a C++ client source code I would like to create a Mex file from it. maybe you can help me

Many thanks

Is there an equal model for Matlab 2015b? I need C-Mex S-Functions for TCP-Send and -Receive.

C Z

I got the same problem as Oli Ver did. How did you fix it?

Kunn Den

thanks for the article.

Oli Ver

Hello!
I got exactly the same error message:
"Error while obtaining sizes from MEX S-function 'matcli' in 'Client/S-Function'. MATLAB error message:
Invalid MEX-file 'C:\TCPIP Blocks\matcli.dll': The specified procedure could not be found."
Can we get the source code? Or can you recompile your code with a newer version of Matlab?

Thanks in advance.

Steven Kolak

Simulink now supports TCP/IP communication with Simulink blocks provided in the Instrument Control Toolbox.

These client blocks enable Simulink models to communicate with remote applications.

Visit the Simulink TCP/IP web page for more information:
http://www.mathworks.com/tcpip

hui lei

On R14, I get the following error: open('E:\MATLAB6p5p1\toolbox1\TCPIP Blocks\TCPIP Blocks\Server.mdl')
The element type "name" must be terminated by the matching end-tag "</name>".
Could not parse the file: d:\matlab7\toolbox\ccslink\ccslink\info.xml
Unable to load mex file: E:\MATLAB6p5p1\toolbox1\TCPIP Blocks\TCPIP Blocks\matser.dll.
ÕÒ²»µ½Ö¸¶¨µÄÄ£¿é¡£

??? Invalid MEX-file 'E:\MATLAB6p5p1\toolbox1\TCPIP Blocks\TCPIP Blocks\matser.dll': ÕÒ²»µ½Ö¸¶¨µÄÄ£¿é¡£

nelson ramirez

Hi
This doesn't appear to be compatible with R14. I've tried it on my old R13 installation and it functions fine. On R14, I get the following error: "Error while obtaining sizes from MEX S-function 'matcli' in 'Client/S-Function'. MATLAB error message:
Invalid MEX-file 'C:\TCPIP Blocks\matcli.dll': The specified procedure could not be found."

I want to know what i have to do
thanks

Viktor Burba

share your source code and help doucument

Craig Sauer

This doesn't appear to be compatible with R14. I've tried it on my old R13 installation and it functions fine. On R14, I get the following error: "Error while obtaining sizes from MEX S-function 'matcli' in 'Client/S-Function'. MATLAB error message:
Invalid MEX-file 'C:\TCPIP Blocks\matcli.dll': The specified procedure could not be found."

zhu haowei

share your source code and help doucument

prashant kulkarni

really good

Rohan Sarker

Updates

1.0.0.0

updated

updated

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

TCPIP Blocks/