LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does the call library function node compile properly when moving to Real Time Operating System

If one sets up a DLL using visual studio, then incorporates the functionality of that code into a Vi using the call function node, will the Vi work properly when targeting the real time operating environment?
0 Kudos
Message 1 of 3
(2,841 Views)
Hi Hummer1,

The Call Library Function Node is valid for real-time targeted VIs.  "...will the Vi work properly when targeting the real time operating environment?" depends on the DLL.  National Instruments recommends you use CVI Real-Time for C-based shared libraries. This will allow for proper compilation and will allow for remote debugging.  If the shared library is C++-based, National Instruments recommends you use VC 6 or VC 7.1 compilers.  Other compilers will require run-time components to be statically linked when compiled, resulting in a large DLL, though these may not all be supported in Real-Time.

Please see "How Can I Verify that My DLL is Executable in LabVIEW Real-Time?" and "Using LabWindows/CVI DLLs in LabVIEW Real-Time Applications" for more information.  I hope this helps.




Message Edited by Pie56694 on 06-24-2008 04:31 PM
Message 2 of 3
(2,822 Views)


@Pie56694 wrote:
Hi Hummer1,

The Call Library Function Node is valid for real-time targeted VIs.  "...will the Vi work properly when targeting the real time operating environment?" depends on the DLL.  National Instruments recommends you use CVI Real-Time for C-based shared libraries. This will allow for proper compilation and will allow for remote debugging.  If the shared library is C++-based, National Instruments recommends you use VC 6 or VC 7.1 compilers.  Other compilers will require run-time components to be statically linked when compiled, resulting in a large DLL, though these may not all be supported in Real-Time.

Please see "How Can I Verify that My DLL is Executable in LabVIEW Real-Time?" and "Using LabWindows/CVI DLLs in LabVIEW Real-Time Applications" for more information.  I hope this helps.

Message Edited by Pie56694 on 06-24-2008 04:31 PM


One ceveat here. If your RT target is VxWorks based (like the cRIO-901x) you will need to recompile the DLL into an .out library using either the (paid for) VxWorks IDE or the free Gnu based VxWorks command line tool chain that is compatible with the VxWorks version running on the target. The VxWorks version is depending on the LabVIEW RT Version you are using with VxWorks 6.1 for LabVIEW RT 8.2 and VxWorks 6.3 for LabVIEW RT 8.5.

And that shared library can not make use of any Windows APIs since they do not exist in VxWorks. Standard C runtime and LabVIEW manager functions are the only ones you can use.

Rolf Kalbermatter


Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 3 of 3
(2,811 Views)