Thank you very much for your answer. I have tried both solutions that you gave to me, but unfortunately both doesn't work for me how I would like to. The main problem is that whatever method I use there is a need to stop MATLAB script for a moment to let Simulink gather a data, which means I have to use pause() command inside of main for loop of my MATLAB script. If I don't do this, Simulink waits with executing a model at t=0. The problem is that a minimum time for which the m-code script can be stopped by pause() command is approximately 0.0156 s. which is to long for me. That script realize object tracking on the video images from webcam, so such a long pauses causes the fps decrease. So, my next question, more precise is: Is there any way to stream data from running MATLAB script to running Simulink model without, or with just very small delay?