Solution
You can call external code from LabVIEW on a RT target by compiling the DLL into a supported file type for your RT operating system.
Note: If you try to call shared library files on an unsupported operating system, you will run into errors when your code is deployed.
To use shared libraries in your real-time code:
- First, check to see what real-time operating system is running on your device.
- Examine the following chart to find which shared library file type you need to compile to:
Operating System | VxWorks | PharLap | Linux-RT |
---|
File Type | .out | .dll | .so |
---|
- Call your code with a Call Library Function Node. Only code adherent to the C or stdcall conventions can be integrated in LabVIEW Real-Time.
If you acquired a library from a third-party, you can call this library when working with the supported real-time OS. For example, in order you use a third-party .dll, you would need to be on a PharLap RT target and would not be able to use a Linux RT target.