Chapter 2 Using Loadable Compiled Modules
LabWindows/CVI Programmer Reference Manual 2-2
©
National Instruments Corporation
Advantages and Disadvantages of Using Loadable Compiled Modules
inLabWindows/CVI
Using compiled modules in LabWindows/CVI has the following advantages:
• Compiled modules run faster than source modules. Compiled modules do not contain the
debugging and user protection code LabWindows/CVI generates when it compiles
source modules. Compiled modules you generate in external compilers can run faster
because of optimization.
• LabWindows/CVI recompiles the source modules in a project each time you open the
project. Also, if an instrument driver program file is a source module, LabWindows/CVI
recompiles it each time you load the instrument driver. LabWindows/CVI does not
recompile compiled modules when you open a project or load an instrument driver.
• In standalone executables, you can dynamically load compiled modules but not source
modules.
• You can install compiled modules, but not source modules, into the Library menu.
• You can provide libraries for other developers without giving them access to your source
code.
Using compiled modules in LabWindows/CVI has the following disadvantages:
• You cannot debug compiled modules. Because compiled modules do not contain any
debugging information, you cannot set breakpoints or view variable values.
• Compiled modules do not include run-time error checking or user protection.
Using a Loadable Compiled Module as an Instrument Driver
ProgramFile
An instrument driver is a set of high-level functions with graphical function panels to make
programming easier. It encapsulates many low-level operations, such as data formatting and
GPIB, RS-232, and VXI communication, into intuitive, high-level functions. An instrument
driver usually controls a physical instrument, but it also can be a software utility. The Using
Instrument Drivers and Instrument Menu sections of Chapter 3, Project Window, of the
LabWindows/CVI User Manual describe how to use instrument drivers.
To develop and debug an instrument driver, load its program file into LabWindows/CVI as a
source file. After you finish debugging it, you can compile the program file into an object file
or a Windows 95/NT DLL. The next time you load the instrument driver, LabWindows/CVI
loads the compiled module, which loads and runs faster that the source module.
Refer to the LabWindows/CVI Instrument Driver Developers Guide for information on how
to create an instrument driver.
00ProRef.book : 06chap02.fm Page 2 Monday, March 9, 1998 3:23 PM