top of page

Integration of Simatic S7-1200 with the Matlab/Simulink 

This was my master thesis in Automatics and Robotics. The aim of the project was the integration between Simatic S7-1200 and the numerical computing environment Matlab/Simulink. 

The communication between the PLC and Matlab/Simulink was based on TCP/IP and UDP protocols. On the side of Simulink I wrote S-Function "client.c" that uses functions from standard library Winsock32. On the side of Simatic S7-1200 I used function blocks TSEND_C, TRCV_C, TCON, TURCV, TUSEND from Communication library in  TIA Portal. This idea is presented in the picture below.

Integration of Simulink with Simatic S7-1200

The main idea of this thesis was to build a virtual laboratory in which you could create control system on PLC in TIA Portal environment and simulate the plant on PC in Simulink. Additionally, the plant should be visualized in 3D animation. To achieve this aim I used VRML language and Simulink 3D Animation Toolbox. The movie below shows the final results of this project: 

I also prepare movie that describes how to configure the communication between Matlab/Simulink with Simatic S7-1200:

If you need more information, have any questions or want to get sources with S-Function please conntact with by this page or email.

bottom of page