AmesimKnowledge

Using the Simcenter Amesim to Simulink Interface > Importing into Simulink Without Using the Simcenter Amesim Library

Importing Simcenter Amesim Model for Co-Simulation Interface

Once again, it is strongly recommended to start MATLAB from Simcenter Amesim to automatically inherit the environment. Simcenter Amesim models must remain open in Simcenter Amesim during the process.

Assuming that the Simcenter Amesim model is named skyhookcosim, the best way to create the S-Function used to import the Simcenter Amesim model is to use a dedicated MATLAB script amecreatecosimsfunmask such as:

The first parameter is the name of a Simulink submodel that does not exist yet. The second parameter is the Simcenter Amesim model name.

The result of the script is the creation of a Simulink submodel named SimulinkCosim which includes the S-Function importing the Simcenter Amesim model.

The name of the input and output are not set yet. To do, it is necessary to run the submodel in Simulink one time. After this dummy simulation of the submodel, name of IO are set on the S-Function.

The run and global parameters are available by double clicking on the S-Function.

Figure 71: Run and global parameters

S-Function Parameter Description

Using the model hydraulic presented in Importing Black-box models into Simulink using amecreatebbmask command with a co-simulation interface, the S-Function produced after the call to amecreatecosimsfunmask is shown in the Figure 73 figure. Here we also present the S-Function parameters created by the script for this particular example.

Figure 72: S-Function parameters after call to amecreatecosimsfunmask

Figure 73: Function parameters after the call to amecreatecosimsfunmask

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Simulink/Importing_AMESim_Model_for_CoSimulation_Interface · retrieved 2026-07-17