04-06-2015 09:19 AM
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
Solved! Go to Solution.
04-06-2015 01:52 PM - edited 04-06-2015 01:54 PM
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.
04-07-2015 01:38 AM
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
04-07-2015 05:27 AM - edited 04-07-2015 05:27 AM
04-07-2015 06:08 AM
Thanks Rolf!
You are a better searcher than I am
Regards,
g_l_u_p