I have a Simulink block, accepting TCP/IP connections and reading the incoming data.
The data has to be integers of type int32. 
Imagine we have  a variable of any integer number in Python.
We can convert the number to a string and send it via a tcp socket. So far no Problem.
But how to convert the number to that kind of string, that my Simulink blocks receives the number in int32 format?
In Matlab simulink, there is block named TCP/IP receive.
after choosing this block, double click on it. You will see number of option regarding type of data that matlab receiving.
TCP/IP Message from Python to Simulink