AmesimKnowledge

Using the Simcenter Amesim to Simulink Interface > Using the Simcenter Amesim-Simulink Black-box interface

Generating the ASBB

Main data files

The function behind the Simcenter Amesim-Simulink Black-box is the function developed for export of Simcenter Amesim models to real-time platforms. Real-time platforms do not normally include disk access. So for real-time platforms the main data (model_.data, model_.gp, and model_.gp2) are stored in character arrays compiled into the C code. The same procedure is used also for the Simcenter Amesim-Simulink Black-box. Since the goal with the ASBB is to encapsulate a model with potentially sensitive data, we have added encryption of the character arrays. In this way it is difficult (in practice probably impossible) to access the data used in the model.

Data files for submodels

Tables used by submodels will also be put into the ASBB. Data files for submodels that can be incorporated into the ASBB model include all table types that the Simcenter Amesim table editor can deal with. If the tables have been created with another tool it is recommended that the first line of the file should contain an indication of the file type like:

Table format: 1D

For files provided with Simcenter Amesim this will always be the case.

The allowed file types are:

  • 0D : a flat file with one value per line. Often used for solid properties.

  • 1D : Used for y = f(x)

  • T1D: Used for y = f(x1, x2)

  • 2D: Used for y = f(x1, x2) when the y, x1, x2 values are equally spaced.

  • 3D: y=f(x1,x2, x3)

  • T3D: y=f(x1, x2, x3, x4)

Please note that the data in data files is not encrypted when put into the ASBB DLL. They are stored in a binary format which gives a certain protection (the same as any compiled code). Please note that if the files are of an unknown type they will not be inserted into the DLL. This means that it is indeed possible to use data files other than the supported ones if it is acceptable to provide the data files separately.

Customized super-components

If there are customized super-components in the system all their private data (contents of the gp2 file) will also be encrypted into the DLL.

Generate the Simcenter Amesim-Simulink Black-box

Since the generation of the Simcenter Amesim-Simulink Black-box includes the data files in the compiled S-function it is necessary to perform the code generation from Simulation mode. If you have a license for the Black-box generation you will have a menu item Generate Simcenter Amesim-Simulink black-box in your Interfaces menu. When this item is selected the code generation starts immediately.

Figure 44: Black-box generation menu in Simulation mode

Figure 45: First step in creating a Black-box - press continue to proceed

Figure 46: Compilation and linking of the Simcenter Amesim-Simulink Black-box

Note the title "Creating Simcenter Amesim/Simulink Black-box S-function" at the end of the text in this popup. This is actually the only difference between a standard compilation and a ASBB compilation. We recompile both the standard S-function and the newly created ASBB S-function. We do this to be 100% sure that the standard S-function and the ASBB S-function contain the same code. You will now have two S-functions in your working directory: the standard S-function skyhook_.mexw64 and the black-box skyhook.mexw64.

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