LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Executing Simulink Code on cRIO

Solved!
Go to solution

Hi everyone,

 

I am wondering if anyone has a Mathworks Simulink model running on an RT target such as cRIO.

 

In other projects I've done this on the past using LabVIEW 2010 SP1 and Simulation Interface Toolkit (SIT). You would compile a Simulink model as a DLL, OUT or RTDLL, and used it on a timed loop with SIT's VIs.

 

What I am reading for LabVIEW 2014 talks about Model Interface Toolkit, but it always refers to running the compiled model on a Host PC.

Does anyone know if it is possible to run DLL compiled with MIT on an RT target????

 

Regards!

g_l_u_p

0 Kudos
Message 1 of 5
(4,254 Views)

A DLL is a Windows executable format. As such it only ever can run on Pharlap based RT targets. VxWorks based ones use the special .out format, while the new Linux RT are using ELF shared libraries, compiled either for the ARM (cRIO 906x and myRIO) or x64 (cRIO 903x) architecture. So unless your Simulink code can be compiled to either of these two shared library formats,  you can not execute the code on any of the non Pharlap based targets.

 

Even the Pharlap ones pose some serious challenges. For one the Pharlap ETS OS is not a fully implemented Win32 API but a subset of this. DLLs that are compiled to run on an NT4 or 2000 system have a good chance to run on Pharlap. DLLs for newer Windows variants are likely to make use of either Win32 APIs that do not exist in Pharlap ETS or of Visual C runtime versions that are not available for the Pharlap OS. The Visual C 6 runtime was directly implemented in the Win32 API and basically didn't require any extra install if you were not running on Win95. NI ported the Visual C 7.1 and Visual C 9.0 runtime to their Pharlap targets but newer C runtimes than that are simply not supported. And Visual C DLLs and executables require different runtimes for each Visual C version. So unless your DLL is compiled with Visual C 6, 2003 (MSVC runtime 7,1) or 2008 (MSVC runtime 9.0) the DLL will likely not be compatible with the Pharlap RT system either. 

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 5
(4,240 Views)

Thanks for your reply Rolf!

 

That was exactly what I was wondering: Does the Model Interface Toolkit include the compilers for cRIO systems (VxWorks, RT Linux and/or Pharlap OS)?

Simulation Interface Toolkit did. It had a compiler that could be used on Mathwork's Simulink to generate *.dll or *.out (depending on the cRIO's OS).

 

Regards!

g_l_u_p

0 Kudos
Message 3 of 5
(4,216 Views)
Solution
Accepted by topic author g_l_u_p

According to this it seems possible but requires you to use the 2014 verson of the MIT. And you'll seem to have to watch during the installation to select the correct installation variant to get the option to select the right tools.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 5
(4,200 Views)

Thanks Rolf!

You are a better searcher than I am Smiley Embarassed

 

Regards,

g_l_u_p

 

 

0 Kudos
Message 5 of 5
(4,189 Views)