Calling external dlls in real-time applications
Posted 09 October 2008 - 10:33 AM
I'm developing a system for benchmarking real-time performance of a set of Matlab functions. For this I'm using LabVIEW 8.5 with Real-time module and Simulation Interface Toolkit 4.0.
I'm experiencing problems when using methods from the libmwlapack.dll library in my models. This Linear Algebra Pack is written in Fortran and is used by Matlab for matrix operations.
My Simulink models are mainly S-functions written in C. It's only those using the Lapack library that causes the crash.
The problem appears when running certain SIT dlls on the real-time target, more precisely those utilising the Lapack library. They work fine when calling them in the Windows environment. When I call them on the real-time target they are initialized without problems but when I call the SIT Scheduler to run the simulation the RT Computer crashes.
I did have problems initializing the models until I downloaded the libmwlapack.dll file to the RT target.
Does anybody have any experience from using library dlls like this on a real-time target? The only cause I can think of is that the dll does something to the memory which works fine under Windows but causes a crash when run on the RT target.
Posted 07 June 2011 - 07:51 PM
The only cause I can think of is that the dll does something to the memory which works fine under Windows but causes a crash when run on the RT target.
Your dll may be calling functions in the kernel that are not a part of the micro kernel subset. Have you tried the DLL Checker?