Calling a C-built DLL in LabVIEW to Generate and Sort an Array of Numbers

Publish Date: Aug 19, 2008 | 13 Ratings | 3.62 out of 5 | Print | 1 Customer Review | Submit your review

This example is designed to illustrate the concept of using external code in LabVIEW. Specifically, this example demonstrates that LabVIEW allows a developer to use the code developed external to LabVIEW. This example contains a LabVIEW program that generates and sorts an array of numbers by calling a C-built DLL using LabVIEW's Call Library Function Node. This example also contains the C source code that the DLL was built from. It contains a .c file and a .prj file that can be build in LabWindows/CVI, as well as a .cpp file and all of the project files necessary to build this in Microsoft Visual C++. If you see a broken arrow when you open the LabVIEW VI, double-click on the Call Library Function Node and relink to the exact path of the DLL.

This example was written in conjunction with the "Can LabVIEW C? - Example 3: Using the Right Tools with LabVIEW" document linked below, which compares C and LabVIEW's functionality.


  • LabVIEW 8.0 or later or LabVIEW Evaluation Software is required to view and run the LabVIEW examples.
  • Any C compiler is required to view and execute the C code. If you do not have a C compiler, you can download the LabWindows/CVI Evaluation Software to run the C code and to try the premium C environment for measurement and automation applications. At a minimum, the LabWindows/CVI Run Time Engine is required to run the CVI executable.
Related Links:
Evaluate LabVIEW online, download LabVIEW evaluation software, or request a LabVIEW DVD trial version.
LabWindows/CVI Evaluation Software
LabWindows/CVI Run Time Engine
Can LabVIEW C? - Example 3: Using the Right Tools with LabVIEW
Can LabVIEW C? Overview Whitepaper


Back to Top

Customer Reviews
1 Review | Submit your review

Clear and easy DLL code!  - Apr 17, 2004

Bookmark & Share





Rate this document

Answered Your Question?
Yes No