AmesimKnowledge

Using the Simulink to Simcenter Amesim Interface > SL2AMECosim advanced topics

Hiding input and output blocks

Block I/O variables are the input and output from blocks in the Simulink model. An option exists in SL2AMECosim to completely hide these "internal" variables. If the option hide_vars is passed to the SL2AMECosim command all block I/O will be hidden. This can be useful if there are confidential information in the model - or simply if the internal workings of the model is not interesting/useful for the end user. In the example below the signal from the "Transfer Fcn1" is a "block I/O" variable.

As the resulting Simcenter Amesim system has several input output variables, we will need to consider how Simcenter Amesim numbers its ports. Simcenter Amesim starts its numbering at the bottom left corner of the icon and counts counterclockwise. SL2AMECosim will always place the output on the left side of the icon. So in this case the created submodel will have the ports as indicated in the figure below. The first output is thus on the bottom of the right side. You can open the External Variables popup to see the ports. If you hover the mouse cursor over a port you can see the variable name.

The extended names of the block I/O signals are available in the help for the generated submodel. In the help you can also clearly see the names of the variables on the ports. Note again the port numbering.

You can hide some of the I/O blocks via signal storage optimization using the options Signal storage reuse and enable local block outputs.

This reduces the number of I/O blocks in the model at code generation stage. To completely hide the internal variables use the hide_vars option.

>> sl2amecosim('relayAndMore','here', 'auto', 'hide_vars')

This will create a submodel (in a directory called "here") without internal variables - see figure below.

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