필터 지우기
필터 지우기

How to use a dll file in Simulink/Simscape using S-functions?

조회 수: 7 (최근 30일)
Laurenzo Blonda
Laurenzo Blonda 2021년 5월 6일
답변: Oliver Jaehrig 2021년 5월 6일
In order to share a Simulink/Simscape model with a third party I generated a shared library/ dll-file from this model. I assume this provides a safe way to share a protected model. However to test if the dll-file works, I want to make sure that I myself can run the dll file again in Simulink. I understand that S-function blocks are used to do this, however I don't know how to do this for dll-files (in contrast to mex files, which can be simply added to the S-function block).
Online I found quite some help on this, however I'm not familiar with C-code and didn't understand the answers there.
So my question comes down to:
  1. What are the steps I need to take to use a dll file in a s-function block?
  2. Do I need to write c-code supporting files for this to work?
  3. Can S-functions work with Simscape blocks?
  4. I want to share this dll as a protected file ( to keep the third party from knowing what's inside the model). Is this possible with dll-files? I know 'protected models' cannot be used because of the fact that I use Simscape ports at the root level of my model.
Regarding info on the model: the model contains several simulink in/output ports as wel as Simscape in/output ports. The logic inside will only contain basic simulink/simscape blocks.

답변 (1개)

Oliver Jaehrig
Oliver Jaehrig 2021년 5월 6일

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by