Building Applications and Creating DLLs in LabVIEW - PowerPoint PPT Presentation

About This Presentation
Title:

Building Applications and Creating DLLs in LabVIEW

Description:

... library can require the presence of other non-VI files, including ... By specifying custom destinations, you can create directory structures during installation ... – PowerPoint PPT presentation

Number of Views:545
Avg rating:3.0/5.0
Slides: 30
Provided by: ftp7
Category:

less

Transcript and Presenter's Notes

Title: Building Applications and Creating DLLs in LabVIEW


1
Building 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)

2
Topics
  • System requirements
  • Project architecture
  • Building the application or shared library
  • Creating the installer

3
Development 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)

4
Deployment Requirements
  • All applications or shared libraries built in
    LabVIEW require the LabVIEW Run-Time engine
  • In LabVIEW 6i, this is true on all platforms

5
Project 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

6
Top-Level VIs Only
  • One or more top-level VIs
  • All other VIs are subVIs of the top-level VIs
  • The simplest LabVIEW architecture

7
Top-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

8
Architectures 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

9
Building the Target
  • Project architecture
  • Prototypes for exported VIs (shared library only)
  • Desired packaging
  • Other files needed

10
Building 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

11
Building an Application (cont.)
  • Basic results of building an application
  • Executable file
  • ActiveX type library (if ActiveX server enabled)

12
Building 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

13
Building 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

14
Building a Shared Library (cont.)
  • Basic results of building a shared library
  • Shared library file
  • Embedded type library on Windows (sometimes)
  • Header file
  • Import library

15
Desired Packaging
  • LabVIEW can package the build target in two forms
  • Single file (executable or shared library)
  • Single file and one VI library

16
Single 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

17
Executable 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

18
Other 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

19
Application 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

20
Preferences File (cont.)
21
Preferences File (cont.)
22
VI 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

23
Other 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

24
Other Options (cont.)
  • Default memory size (Macintosh)
  • Specify the preferred memory size for the
    application

25
Creating 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

26
Advanced 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

27
Installing 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

28
Results of the Build Process
  • Directory that contains an image of your complete
    file set
  • Directory that contains disk images of the
    installer

29
Demonstration
30
Topics
  • System requirements
  • Project architecture
  • Building the application or shared library
  • Creating the installer

31
Question and Answer
Write a Comment
User Comments (0)
About PowerShow.com