Download LabVIEW User Manual

Transcript
Creating VIs and SubVIs
7
After you learn how to build a front panel and block diagram, you can
create your own VIs and subVIs, distribute VIs, and build stand-alone
applications and shared libraries.
Refer to the LabVIEW Development Guidelines manual for more
information about planning your project, including information about
common development pitfalls and tools you can use to develop your
project.
For more information…
Refer to the LabVIEW Help for more information about creating and using subVIs,
saving VIs, and building stand-alone applications and shared libraries.
Planning and Designing Your Project
Before you develop your own VIs, create a list of tasks your users will need
to perform. Determine the user interface components and the number and
type of controls and indicators you need for data analysis, displaying
analysis results, and so on. Think about and discuss with prospective users
or other project team members how and when the user will need to access
functions and features. Create sample front panels to show to prospective
users or project team members and determine if the front panel helps your
users accomplish their tasks. Use this interactive process to refine the user
interface as necessary.
Divide your application into logical pieces of manageable size. Begin with
a high-level block diagram that includes the main components of your
application. For example, the block diagram could include a block for
configuration, a block for acquisition, a block for analysis of the acquired
data, a block for displaying analysis results, a block for saving the data to
disk, and a block to handle errors.
After you design the high-level block diagram, define the inputs and
outputs. Then, design the subVIs that make up the main components of the
high-level block diagram. Using subVIs makes the high-level block
© National Instruments Corporation
7-1
LabVIEW User Manual