From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulink model conversion to DLL

Dear All, I want to convert Simulink model to DLL by use Real Time Workshop and nidll.tlc (using this guide: http://zone.ni.com/reference/en-XX/help/371504C-01/lvsimtkhowtoconcepts/simulink-sit_h_convert_model... I setup compiler Lcc-win32 C 2.4.1 by use mex –setup command. When I start building process after few seconds I get error and following messages: >> Real-Time Workshop build procedure for model: 'file_name' aborted due to an error. and: Invalid setting for environment variable MSDevDir or DevEnvDir. The setting is: '' You can verify the setting by checking for the existence of: %DevEnvDir%\..\tools\vsvars32.bat (for Visual C/C++ 9.0) %MSDevDir%\..\..\vc98\bin\vcvars32.bat (for Visual C/C++ 6.0) %DevEnvDir%\..\tools\vsvars32.bat (for Visual C/C++ 8.0) You must define MSDevDir or DevEnvDir to be: set %DevEnvDir%=\common7\ide (for Visual C/C++ 9.0) set %MSDevDir%=\common\msdev98 (for Visual C/C++ 6.0) set %DevEnvDir%=\common7\ide (for Visual C/C++ 8.0) This error may be due to an invalid preference file: C:\Users\admin\AppData\Roaming\MathWorks\MATLAB\R2010a\mexopts.bat Please run "mex -setup" at the MATLAB prompt to correct System configuration: - LabView 2010; - Matlab 2010a - I used Lcc-win32 C 2.4.1 compiler. What should I change to get DLL file of Simulink model? miro
0 Kudos
Message 1 of 5
(3,221 Views)

Previous message was completely unreadable. Once again:

 

Dear All,


I want to convert Simulink model to DLL by use Real Time Workshop and nidll.tlc (using this guide: http://zone.ni.com/reference/en-XX/help/371504C-01/lvsimtkhowtoconcepts/simulink-sit_h_convert_model... I setup compiler Lcc-win32 C 2.4.1 by use mex –setup command. When I start building process after few

seconds I get error and following messages:


>> Real-Time Workshop build procedure for model: 'file_name' aborted due to an error.


and:


Invalid setting for environment variable MSDevDir or DevEnvDir.
The setting is: ''
You can verify the setting by checking for the existence of:
%DevEnvDir%\..\tools\vsvars32.bat (for Visual C/C++ 9.0)
%MSDevDir%\..\..\vc98\bin\vcvars32.bat (for Visual C/C++ 6.0)
%DevEnvDir%\..\tools\vsvars32.bat (for Visual C/C++ 8.0)

You must define MSDevDir or DevEnvDir to be:
set %DevEnvDir%=<VisualRoot>\common7\ide (for Visual C/C++ 9.0)
set %MSDevDir%=<VisualRoot>\common\msdev98 (for Visual C/C++ 6.0)
set %DevEnvDir%=<VisualRoot>\common7\ide (for Visual C/C++ 8.0)

This error may be due to an invalid preference file:
C:\Users\admin\AppData\Roaming\MathWorks\MATLAB\R2010a\mexopts.bat
Please run "mex -setup" at the MATLAB prompt to correct

 

System configuration:

- LabView 2010;

- Matlab 2010a

- I used Lcc-win32 C 2.4.1 compiler.


What should I change to get DLL file of Simulink model?

 

 

miro 

0 Kudos
Message 2 of 5
(3,213 Views)

Hello miro,

 

Can you please tell me the version of Windows you are running and version of Microsoft Visual C++ you have installed?

 

Best Regards,

 

Gregor Cerne

National Instruments

0 Kudos
Message 3 of 5
(3,175 Views)

Hello Gregor,


Thank you for your response. I have just solved described problem. 

I have Windows 7 and (now) Microsoft Visual C++ 2008. This configuration works very good. The problem was caused by previous Microsoft Visual C++ installation: 2010. It cannot cooperate with Matlab 2010a.


miro

0 Kudos
Message 4 of 5
(3,168 Views)

Hello miro,

 

I glad that you solved your problem. I found this site with table describing compatibility between MatLAB, Simulink, Microsoft Visual C++, LabVIEW and SIT - just in case you will have simiral problem in the future:

http://digital.ni.com/public.nsf/allkb/D174674A91E5536286257428005C2426

 

 

Best Regards,

Gregor Cerne

 

National Instruments

0 Kudos
Message 5 of 5
(3,156 Views)