Title: Building Applications and Creating DLLs in LabVIEW
1Building Applications and Creating DLLs in
LabVIEW
- Kyle P. Gupton
- LabVIEW RD Group Manager
- Thurs Aug 17
- 1200-115 p.m., 330-445 p.m.
- Cedar (8C)
2Topics
- System requirements
- Project architecture
- Building the application or shared library
- Creating the installer
3Development Requirements
- Building applications and shared libraries
- LabVIEW Professional Development System OR
- LabVIEW Base Package or Full Development System
Application Builder - Building shared libraries
- MPW ToolServer (Macintosh)
- GNU C Compiler (All UNIX platforms) OR
- Unbundled C Compiler (Solaris only)
4Deployment Requirements
- All applications or shared libraries built in
LabVIEW require the LabVIEW Run-Time engine - In LabVIEW 6i, this is true on all platforms
5Project Architecture
- All LabVIEW projects have a high-level
architecture - Typical high-level architectures of LabVIEW
projects include - Top-level VIs only
- Top-level VIs and dynamically-called VIs
- Note that this architecture is independent of how
you save the VIs on disk
6Top-Level VIs Only
- One or more top-level VIs
- All other VIs are subVIs of the top-level VIs
- The simplest LabVIEW architecture
7Top-Level VIs and Dynamic VIs
- Consists of one or more top-level VIs with other
VIs dynamically called via the VI Server - The dynamic VIs are not part of the hierarchies
of the top-level VIs - Most advanced LabVIEW projects are a variant of
this architecture
8Architectures and Build Targets
- In an application, the top-level VIs run when you
launch the application - In a shared library, the top-level VIs are
exported functions within the library
9Building the Target
- Project architecture
- Prototypes for exported VIs (shared library only)
- Desired packaging
- Other files needed
10Building an Application
- VIs that you build into the application are
classified as - Top-level VIs
- Dynamic VIs
- Your application must always have at least one
top-level VI
11Building an Application (cont.)
- Basic results of building an application
- Executable file
- ActiveX type library (if ActiveX server enabled)
12Building a Shared Library
- VIs that you build into a shared library are
classified as - Exported VIs
- Dynamic VIs
- Your shared library must always have at least one
exported VI
13Building a Shared Library (cont.)
- For each exported VI, you specify the following
information - Function name
- Calling convention
- Parameter list
- This information forms the prototype used when
calling the function from another program
14Building a Shared Library (cont.)
- Basic results of building a shared library
- Shared library file
- Embedded type library on Windows (sometimes)
- Header file
- Import library
15Desired Packaging
- LabVIEW can package the build target in two forms
- Single file (executable or shared library)
- Single file and one VI library
16Single File Package
- All VIs and their subVIs are embedded in the
resulting executable or shared library file - This can result in a rather large file
17Executable and VI Library Package
- Top-level (or exported) and dynamic VIs are
embedded in the resulting executable or shared
library file - All subVIs are stored in a single VI library
18Other Files Needed
- Your application or shared library can require
the presence of other non-VI files, including - Preferences file (application only)
- Help files that your VIs call
- LabVIEW automatically includes run-time menu
(.mnu) files and DLL files called via the Call
Library Node
19Application Preferences File
- Every application can have a preferences file
resembling the LabVIEW preferences file - If your application requires specific LabVIEW
preferences, you must replicate these settings in
the preferences file for your application
20Preferences File (cont.)
21Preferences File (cont.)
22VI Settings
- You can modify the settings for all VIs in an
application or shared library - LabVIEW removes the diagrams from all VIs and the
panels from all non-user-interface VIs by default
23Other Options
- Custom icon (Windows)
- Specify an icon (.ico) file to use for the
application icon or windows displayed by the
shared library - Create this file in applications such as
LabWindows/CVI and Microsoft Visual Studio - ActiveX Server (Windows)
- Select whether to enable the ActiveX Server
capabilities for the application - Specify the name of the server
24Other Options (cont.)
- Default memory size (Macintosh)
- Specify the preferred memory size for the
application
25Creating the Installer (Windows)
- You must include all files to be installed in the
source files list - Any file in the distribution can receive an
associated program item - By specifying custom destinations, you can create
directory structures during installation
26Advanced Installer Settings
- Run executable after installation
- This file must be one of the files installed in
the Install Directory - Install LabVIEW Run Time Engine
- Enable this option to have installer also install
the LabVIEW Run Time Engine on the target system
27Installing Other Components
- Most applications require other software
- NI-DAQ
- NI-488.2
- NI-VISA
- ODBC drivers
- ActiveX controls
- You can launch installers for these with a batch
file
28Results of the Build Process
- Directory that contains an image of your complete
file set - Directory that contains disk images of the
installer
29Demonstration
30Topics
- System requirements
- Project architecture
- Building the application or shared library
- Creating the installer
31Question and Answer