필터 지우기
필터 지우기

Can I call a Simulink generated DLL file in a Simulink model (Matlab 2018b)?

조회 수: 10 (최근 30일)
Panagiotis Bountouris
Panagiotis Bountouris 2019년 4월 14일
댓글: Mark McBroom 2024년 5월 19일
I have created a .dll file (see fig: PID_win64.dll) and associated headers (see fig: in PID_ert_shrlib_rtw) with the aid of Simulink (see fig: PID.slx). I now want to call it in a simulink model (see fig: test_dll.slx) where I am going to test it. I have read in older posts that I have to use S-Function block. Please let me know if this is the proper route I should follow and if so could you please share with me the exact steps (where should I allocate the name of dll and headers - which headers) ?
The final aim is to import the created .dll file in DIgSILENT POWERFACTORY. If anyone can share any further information regarding this would be highly appreciated.
  댓글 수: 3
Ziyan Li
Ziyan Li 2020년 4월 27일
hi, i have the same quesition. Have you solved your problem? I have a DLL (compiled from visual studio), i want to know, how can i call it in Simulink. This DLL was also used in Powerfactory.
Rajat Ghare
Rajat Ghare 2020년 9월 16일
Hello,
I have the same question. I have generated a dll using embedded coder.I want to test this dll before I send it further to be used in Powerfactory. I tried some links from forum but didnt reach the goal. Can anyone help me on this if you have developed any solution that i can follow. thanks

댓글을 달려면 로그인하십시오.

답변 (1개)

Mark McBroom
Mark McBroom 2019년 4월 15일
Yes, creating an S-Function one possible approach. I presonally prefer the legacy_code tool, but S-Function builder will also work.
Note that you can also call C code in a DLL from a MATLAB Function block using the coder.ceval() function.
  댓글 수: 7
Mark McBroom
Mark McBroom 2020년 8월 25일
Hi Lisette,
MathWorks has developed a solution specifically for PowerFactory. Please email me at mmcbroom@mathworks.com for details.
Thanks.
Mark.
Mark McBroom
Mark McBroom 2024년 5월 19일
Powerfactor and Simulink now both support the FMU standard. See this link for details:
Thanks.
Mark.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by