LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compile Errors occured when simulink models including 'cmex' by SIT

I am trying to compile a simulink model to DLL with following softwares and hardwares.
 
Software:
LabVIEW 8.0.1
LabVIEW Realtime 8.0.1
Simulation Interface Toolkit 3.0
MATLAB R13
Visual C++ 6.0 Service Pack 4
 
Target Hardware:
PXI-1042RT
PXI-8196
PXI-6289
 
When I tried to compile a model including 'cmex' function on Simulink to DLL, compile error about Visual C++ occured. Does SIT support the model including 'cmex' functions?
When I removed the function 'cmex', compiling is working correctly.
To import original model which is written by C or other language, I strongly want to use 'cmex' functions. To avoid the compile error, if you have any ideas, please let me know.
 
Thanks,
 
Tsugo
 
 
0 Kudos
Message 1 of 5
(3,122 Views)
Hello Tsugo,

I believe that it is possible to compile a DLL for SIT from a model that contains a cmex function.

To tell whether the issue is caused by SIT or not, you can try changing the RTW target file from nidll.tlc to grt.tlc (in the model's Simulation Parameters dialog, look in the Real-Time Workshop tab), and see whether the compile error still happens. If the compiler error occurs with grt.tlc, then please refer to the documentation provided by The MathWorks Inc. on how to get your cmex functions to work in Real-Time Workshop®.

If the compiler error does not occur with grt.tlc, then please post the whole text of the compiler error.

Thanks!
Andrew
Message 2 of 5
(3,107 Views)
Tsugo,

There is one more thing that I ought to mention.

You said that you're using LabVIEW 8.0.1 and Simulation Interface Toolkit 3.0. If you are using LabVIEW 8.0.1 (or LabVIEW 8.0), then SIT 3.0.1 or later is required. If you have SIT 3.0 but you don't yet have SIT 3.0.1, you can get it here on ni.com.

-Andrew
Message 3 of 5
(3,104 Views)
Hello AndrewE,
 
Thanks for your information, I got SIT3.0.1 and installed it.
 
No error occured when I tried to build a model with grt.tlc.
After this build, I tried to do with nidll.tlc and it was successfully built too.
 
Perhaps models including cmex by VC++ might conflicted with the compiler which is used by RTW.
 
Thanks !
 
 Tsugo
 
0 Kudos
Message 4 of 5
(3,079 Views)
Hello Tsugo,

I am glad to hear that your build worked with SIT 3.0.1.

As you say, it is possible that incorrect compiler settings could cause a build error like the one which you saw.

You're welcome,
Andrew
0 Kudos
Message 5 of 5
(3,071 Views)