Download Lvcore2 Conceptsmanual English PDF

TitleLvcore2 Conceptsmanual English
TagsQueue (Abstract Data Type) Control Flow Object (Computer Science) Class (Computer Programming) Server (Computing)
File Size1.4 MB
Total Pages130
Document Text Contents
Page 1

LabVIEWTM Core 2
Course Manual

Course Software Version 2012
August 2012 Edition
Part Number 325292D-01
LabVIEW Core 2 Course Manual


© 1993–2012 National Instruments Corporation. All rights reserved.
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including
photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written
consent of National Instruments Corporation.

National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by
copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging
to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any
applicable license or other legal restriction.

End-User License Agreements and Third-Party Legal Notices
You can find end-user license agreements (EULAs) and third-party legal notices in the following locations:

• Notices are located in the <National Instruments>\_Legal Information and <National Instruments>

• EULAs are located in the <National Instruments>\Shared\MDF\Legal\License directory.
• Review <National Instruments>\_Legal Information.txt for more information on including legal information

in installers built with NI products.


CVI, LabVIEW, National Instruments, NI,, the National Instruments corporate logo, and the Eagle logo are trademarks of
National Instruments Corporation. Refer to the Trademark Information at for other National Instruments

The mark LabWindows is used under a license from Microsoft Corporation. Windows is a registered trademark of Microsoft
Corporation in the United States and other countries. Other product and company names mentioned herein are trademarks or trade
names of their respective companies.

Members of the National Instruments Alliance Partner Program are business entities independent from National Instruments and
have no agency, partnership, or joint-venture relationship with National Instruments.

For patents covering National Instruments products/technology, refer to the appropriate location: Help»Patents in your software,
the patents.txt file on your media, or the National Instruments Patent Notice at

Page 2

Worldwide Technical Support and Product Information

Worldwide Offices
Visit to access the branch office Web sites, which provide up-to-date contact information, support phone
numbers, email addresses, and current events.

National Instruments Corporate Headquarters
11500 North Mopac Expressway Austin, Texas 78759-3504 USA Tel: 512 683 0100
For further support information, refer to the Additional Information and Resources appendix. To comment on National Instruments
documentation, refer to the National Instruments Web site at and enter the Info Code feedback.

Page 65

LabVIEW Core 2 Course Manual

© National Instruments | 3-5

Example Methods
An example of a method common to all controls is the Reinitialize to Default method. Use this
method to reinitialize a control to its default value at some point in your VI. The VI class has a
similar method called Reinitialize All to Default.

Figure 3-4 is an example of a method associated with the Waveform Graph class. This method
exports the waveform graph image to the clipboard or to a file.

Figure 3-4. Invoke Node for the Export Image Method

D. Control References
A Property Node created from the front panel object or block diagram terminal is an implicitly
linked Property Node. This means that the Property Node is linked to the front panel object. What
if you must place your Property Nodes in a subVI? Then the objects are no longer located on the
front panel of the VI that contains the Property Nodes. In this case, you need an explicitly linked
Property Node. You create an explicitly linked Property Node by wiring a reference to a generic
Property Node.

If you are building a VI that contains several Property Nodes or if you are accessing the same
property for several different controls and indicators, you can place the Property Node in a subVI
and use control references to access that node. A control reference is a reference to a specific front
panel object.

This section shows one way to use control references. Refer to the Controlling Front Panel Objects
topic of the LabVIEW Help for more information about control references.

Creating a SubVI with Property Nodes
As shown in Figure 3-5, the simplest way to create explicitly linked Property Nodes is to complete
the following steps:

1. Create your VI.

2. Select the portion of the block diagram that is in the subVI, as shown in the first part of
Figure 3-5.

3. Select Edit»Create SubVI. LabVIEW automatically creates the control references needed for
the subVI.

4. Customize and save the subVI. As you can see in the second part of Figure 3-5, the subVI uses
the default icon.


l I




t f





Page 66

Lesson 3 Controlling the User Interface

3-6 |

Figure 3-5. Using Edit»Create SubVI to Create Control References

Figure 3-6 shows the subVI created. Notice that the front panel Control Refnum controls have been
created and connected to a Property Node on the block diagram.

Figure 3-6. Sub VI Created Using Edit»Create SubVI

Note A red star on the Control Reference control indicates that the refnum is strictly
typed. Refer to the Strictly Typed and Weakly Typed Control Refnums section of the
Controlling Front Panel Objects topic of the LabVIEW Help for more information about
weakly and strictly typed control references.

Creating Control References
To create a control reference for a front panel object, right-click the object or its block diagram
terminal and select Create»Reference from the shortcut menu.

You can wire this control reference to a generic Property Node. You can pass the control reference
to a subVI using a control refnum terminal.

Using Control References
Setting properties with a control reference is useful for setting the same property for multiple
controls. Some properties apply to all classes of controls, such as the Disabled property. Some
properties are only applicable to certain control classes, such as the Lock Boolean Text in Center

Objects Selected to Create SubVI Edit»Create SubVI used

Created SubVI Front Panel Created SubVI Block Diagram


l I




t f





Page 129

LabVIEW Core 2 Course Manual

© National Instruments | G-7

pull-down menus Menus accessed from a menu bar. Pull-down menu items are usually
general in nature.

PXI PCI eXtensions for Instrumentation. A modular, computer-based
instrumentation platform.


sample Single analog or digital input or output data point.

scale Part of graph, chart, and some numeric controls and indicators that
contains a series of marks or points at known intervals to denote units
of measure.

shortcut menu Menu accessed by right-clicking an object. Menu items pertain to that
object specifically.

string Representation of a value as text.

structure Program control element, such as a Flat Sequence structure, Stacked
Sequence structure, Case structure, For Loop, While Loop, or
Timed Loop.

subpalette Palette that you access from another palette that is above the subpalette
in hierarchy.

subVI VI used on the block diagram of another VI. Comparable to a


task A collection of one or more channels, timing, triggering, and other
properties in NI-DAQmx. A task represents a measurement or
generation you want to perform.

template VI VI that contains common controls and indicators from which you can
build multiple VIs that perform similar functions. Access template VIs
from the New dialog box.

terminal Object or region on a node through which data pass.

tip strip Small yellow text banners that identify the terminal name and make it
easier to identify terminals for wiring.

tool Special cursor to perform specific operations.

toolbar Bar that contains command buttons to run and debug VIs.

Page 130


G-8 |

Traditional NI-DAQ

An older driver with outdated APIs for developing data acquisition,
instrumentation, and control applications for older National
Instruments DAQ devices. You should use Traditional NI-DAQ
(Legacy) only in certain circumstances. Refer to the NI-DAQ Readme
for more information about when to use Traditional NI-DAQ
(Legacy), including a complete list of supported devices, operating
systems, and application software and language versions.


VI See virtual instrument (VI).

virtual instrument

Program in LabVIEW that models the appearance and function of a
physical instrument.


waveform Multiple voltage readings taken at a specific sampling rate.

waveform chart Indicator that plots data points at a certain rate.

While Loop Loop structure that repeats a section of code until a condition occurs.

wire Data path between nodes.

Wiring tool Tool to define data paths between terminals.

Similer Documents