フィルターのクリア

How to load a dll in MATLAB

5 ビュー (過去 30 日間)
Alfredo Guariglia
Alfredo Guariglia 2015 年 1 月 13 日
コメント済み: Alfredo Guariglia 2015 年 1 月 14 日
Hi, me and my team are developing some applications with MATLAB and Simulink. Say that I want to work with dll for multiple advantages that this approach has.
Question: I managed to load a dll in MATLAB now we would like to use it in Simulink. How can it be achieved?
Thanks for the help.

採用された回答

Umakant
Umakant 2015 年 1 月 13 日
編集済み: Umakant 2015 年 1 月 13 日
Please refer to the following link which gives information on using the S-function and to use the DLL in Simulink using Simulink 8.0(R2012b), 32-bit.
The solution by ‘MathWorks Technical Support Team’ to the post also includes information on using the S-function to load the DLL. See the attachment with the post. This example will work for 32-bit MATLAB.
For 64 bit MATLAB you may need to recompile the S-function.If you have a 64-bit application, everything related to that application, including the DLLs, must be compiled as 64-bit.
Refer to the following link for more information:
  1 件のコメント
Alfredo Guariglia
Alfredo Guariglia 2015 年 1 月 14 日
Hi Umakant. Thanks for the answer. I did not specify that I am working with 64 bit MATLAB. I am already able to load and call the library in MATLAB with the available MATLAB functions loadlibrary and calllib. Our task is to ask Simulink to call the dll by mean of an S-Function as you described above; moreover this S-Function should be triggered every t seconds since it is connected to other blocks. These blocks are expecting some inputs that are the outputs of the S-Function, which are some of the dll functions outputs. The link you provided is really useful thou, thanks for that. My doubt is on the S-Function builder: the code should be directly written in the builder dedicated tab "Outputs" or in the .c generated code?
Thanks for the help.
Cheers.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by