This article descibes common user errors and problems regarding the interfacing with the Simcenter Prescan GUI and Simulink
This article describes a few of the problems regarding the connection or interfacing of the Simcenter Prescan created GUI scenario with Matlab Simulink. The standard way to open a model created via the Prescan GUI is to start Matlab from the icon within the GUI shown below. This makes sure, that the paths for interfacing with Simulink is set in Matlab Simulink. You will see that each time starting Matlab from the GUI, see picture below.
If its does not show the paths to various Prescan folders, there will be malfunction for sure. This is one of the main points to be aware. Also, when opening Matlab via the GUI, it will automatically go to the experiment directory. Below you see the button for starting Matlab Simulink via the GUI.
Note: There is also a way to open Matlab with a script and set the paths not starting from the GUI. For this special need, you need to contact support. This problem occurs often when users start Matlab independently from the Prescan GUI. So, at this moment there is no interfacing of the paths. In this case when you try to open the model .slx you will get error messages in Matlab and you will see error on the Simulink model blocks. The reason is that Matlab requires a lot of S-functions to create the specific Model blocks of Prescan. The next picture shows the errors.
Another problem is when users are opening a model in a wrong directory, which also will lead to a none working model. Usually, Matlab gives a notification that you need to change the folder or path.
A third common problem is that no C++ compiler is installed or a not compatible one. Note that it must be compatible with the Prescan and the Matlab version. For this you can check on the Matlab website for compatibility of c++ compiler. Usually MinGW, Visual studio and MS SDK is used. To check if a compiler is installed type in Matlab command window mex -setup. You will see which compilers are installed and you can also choose one of many to use.