Documentation Home Page HYPERSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

S-functions in Simulink allow the user to implement C code within an external file for his model following a strict syntax. An S-function is called inline when the C is written in a tlc file. This case is fully transparent to the user.
For the other cases where the S-function is non-inline, the user has to follow these actions to succeed in importing his model to HYPERSIM:
If the non-inline S-function is embedded in the SPS library (Simscape Power Systems) as Discrete Transport Delay, it’s transparent for the user and there is nothing to do.


For others:

  • Only .c files are supported for S-function in the HYPERSIM importation.
  • Put the .c external file in the same directory of the model .slx or .mdl.
  • Before running the model which contains the S-function in Simulink, do mex fileSfunction.c.
  • Then proceed with the HYPERSIM importation method described in “Importing a Simulink model in HYPERSIM”.
  • No labels