フィルターのクリア

Is possible to access to a MAT-file during the HIL simulation?

3 ビュー (過去 30 日間)
Carlos
Carlos 2013 年 9 月 3 日
Hi, I'm developing a target for a especific hardware. I generate a dll I need to acces to a MAT-file located in the same hardware to change some variables during the simulation. I have seen the files 'matdgns.c' and 'matcreat.c'. But I don't know how can I run this code in my hardware. Thanks in advance
  7 件のコメント
Kaustubha Govind
Kaustubha Govind 2013 年 9 月 10 日
Carlos: If you're writing a DLL independent of MATLAB to access the MAT-file, I don't understand why you have included simstruc.h - which is why I was asking if your DLL is an S-function.
Carlos
Carlos 2013 年 9 月 11 日
My dll is not independent of Matlab. I generate it with Simulink Coder and Embedded Coder, and during the dll compilation the file 'simstruc.h' is included by 'rt_sim.c' in the line 32

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

採用された回答

Kaustubha Govind
Kaustubha Govind 2013 年 9 月 11 日
It appears that you are integrating MAT-file reading/creation code into code generated from Simulink Coder. Would it be possible to put the MAT-file related code in a separate C-file, so you don't see clashes between simstruc.h, and mat.h and matrix.h? I think you can "extern" the MAT-file function from the other C-file and call it from the file generated using Simulink Coder.
  6 件のコメント
Carlos
Carlos 2013 年 9 月 17 日
I have read this document. But when I try to implement it I have this error:
Error: Simulink Coder does not support both External Mode and the C API at the same time.
And I can't clear the external mode due to my requeriments
Kaustubha Govind
Kaustubha Govind 2013 年 9 月 17 日
Carlos: Sorry, this is beyond my expertise. You could try posting a new question or contact MathWorks Tech Support.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by