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: 

Compiling Simulink with the model interface toolkit (MIT)

Solved!
Go to solution

Hello,

 

I'm considering using the Model Interface Toolkit to bring a Simulink Model into the LabVIEW environment. My question deals with the Simulink compiling process. In order to successfully compile the Simulink model into a DLL and then wrap it with the API from MIT does the build process have to take place on a machine that has both Matlab/Simulink  AND  LabVIEW with MIT?

 

Meaning, is it possible to have Matlab/Simulink on one machine (machine A) licensed to some developer (devA) and on another machine (machine B) have a license of LabVIEW licensed to another developer (devB). Can the LV portion of MIT be installed on machine B and the Simulink portion of MIT be installed on machine A such that developer A can compile the simulink model into a DLL and then hand it off to developer B to then wrap it in LabVIEW? Or, is the toolchain such that both Matlab/Simulink and LabVIEW must be on the same machine. Meaning, one developer must have both licenses?

 

Thanks!

0 Kudos
Message 1 of 6
(5,361 Views)

Hello,

 

Thank you for posting! The two stages of the process you are concerned about can happen in complete isolation from one another. You can create a DLL from your Simulink® model in the MATLAB® environment that will work on any computer that has LabVIEW and the Model Interface Toolkit.

 

The process can be considered analogous to creating a DLL from C code, which can then be called from any computer with LabVIEW via the Call Library Function Node.

 

Please let me know if you have any further questions.

 

 

 

MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc.  All other trademarks are the property of their respective owners.

Cameron
Message 2 of 6
(5,332 Views)

Cameron is correct. You can compile models for use with the Model Interface Toolkit with a free activation-only license. You also only need to install on the machine where you want to compile models a subset of the Model Interface Toolkit used to create the models. You don't need LabVIEW installed on that machine, and you don't need to purchase an additional license of MIT.

 

See here and here for more details on compiling models. Note that the first link refers to VeriStand instead of MIT, but the process is the same for both products. VeriStand and MIT use the same Model Framework.

Jarrod S.
National Instruments
0 Kudos
Message 3 of 6
(5,326 Views)

Jarrod,

Thanks for this information. It's very helpful. One followon question then... I have a cRIO-9022 system that I plan on running the Simulink model wrapped with LabVIEW's MIT. The cRIO-9022 is VxWorks based (I believe). How does a cRIO user get the Simulink model compiled for the cRIO? Do I have to have a copy of VxWorks to do the compilation? Does MIT facilitate this? Or, is there a way of doing this compilation w/o purchasing VxWorks?

 


@Jarrod_S. wrote:

Cameron is correct. You can compile models for use with the Model Interface Toolkit with a free activation-only license. You also only need to install on the machine where you want to compile models a subset of the Model Interface Toolkit used to create the models. You don't need LabVIEW installed on that machine, and you don't need to purchase an additional license of MIT.

 

See here and here for more details on compiling models. Note that the first link refers to VeriStand instead of MIT, but the process is the same for both products. VeriStand and MIT use the same Model Framework.


 

0 Kudos
Message 4 of 6
(5,263 Views)

You're correct it will be VxWorks for that controller. You'll just need the compatible gcc compiler for VxWorks targets. Start by checking the compatibility chart, 

 

NI VeriStand Version Compatibility 

http://digital.ni.com/public.nsf/allkb/2AE33E926BF2CDF2862579880079D751

 

For the version of VxWorks on that target its gcc 3.4.4. There is a download for the compiler in the related links section of the compatibility document.

 

*Edited after Jarrod pointed out that the gcc download was in the version compatibility knowledgebase. 

Tim A.
0 Kudos
Message 5 of 6
(5,257 Views)
Solution
Accepted by topic author Southern_Cross

This help document can help you get started with compiling a model for use on a VxWorks cRIO target. You don't need to have your target available to compile the model or write your MIT application. You only need the target to deploy and run the model (obviously).

 

As the help link describes, you'll need to download an appropriate compiler for compiling the VxWorks model. A free GCC version is linked from that document that you can download. You will need this compiler and the Model Framework sub-component of MIT to compile the models.

Jarrod S.
National Instruments
0 Kudos
Message 6 of 6
(5,253 Views)