<< Chapter < Page Chapter >> Page >

Block Diagram Objects: (a) VI, (b) Express VI, (c) Function

One can display subVIs or Express VIs as icons or expandable nodes. If a subVI is displayed as an expandable node, the background appears yellow. Icons can be used to save space in a block diagram and expandable nodes can be used to achieve easier wiring or better readability. One can resize expandable nodes to show their connection nodes more clearly. Three appearances of a VI/Express VI are shown in [link] .

Icon versus Expandable Node

Terminal icons

Front panel objects are displayed as terminal icons in a block diagram. A terminal icon exhibits an input or output as well as its data type. [link] shows two terminal icon examples consisting of a double precision numerical control and indicator. As shown in this figure, one can display terminal icons as data type terminal icons to conserve space in a block diagram.

Terminal Icon Examples Displayed in a Block Diagram

Wires

Wires transfer data from one node to another in a block diagram. Based on the data type of a data source, the color and thickness of its connecting wires change.

Wires for the basic data types used in LabVIEW are shown in [link] . In addition to the data types shown in this figure, there are some other specific data types. For example, the dynamic data type is always used for Express VIs, and the waveform data type, which corresponds to the output from a waveform generation VI, is a special cluster of waveform components incorporating trigger time, time interval and data value.

Basic Wire Types

Structures

A structure is represented by a graphical enclosure. The graphical code enclosed in the structure gets repeated or executed conditionally. A loop structure is equivalent to a for loop or a while loop statement in text-based programming languages, while a case structure is equivalent to an if-else statement.

For loop

A for loop structure is used to perform repetitions. As illustrated in [link] , the displayed border indicates a for loop structure, where the count terminal represents the number of times the loop is to be repeated. It is set by wiring a value from outside of the loop to it. The iteration terminal denotes the number of completed iterations, which always starts at zero.

For Loop

While loop

A while loop structure allows repetitions depending on a condition (see [link] ). The conditional terminal initiates a stop if the condition is true. Similar to a for loop , the iteration terminal provides the number of completed iterations, always starting at zero.

While Loop

Case structure

A case structure (see [link] ) allows the running of different sets of operations depending on the value it receives through its selector terminal, which is indicated by . In addition to Boolean type, the input to a selector terminal can be of integer, string, or enumerated type. This input determines which case to execute. The case selector shows the status being executed. Cases can be added or deleted as needed.

Case Structure

Grouping data: array and cluster

An array represents a group of elements having the same data type. An array consists of data elements having a dimension up to 2 31 1 size 12{2 rSup { size 8{"31"} } - 1} {} . For example, if a random number is generated in a loop, it is appropriate to build the output as an array because the length of the data element is fixed at 1 and the data type is not changed during iterations.

Similar to the structure data type in text-based programming languages, a cluster consists of a collection of different data type elements. With clusters, one can reduce the number of wires on a block diagram by bundling different data type elements together and passing them to only one terminal. One can add or extract an individual element to or from a cluster by using the cluster functions such as Bundle by Name and Unbundle by Name .

Debugging and profiling vis

Probe tool

VIs can be debugged as they run by checking values on wires with the Probe tool. Note that the Probe tool can be accessed only in a block diagram window.

With the Probe tool, breakpoints and execution highlighting, one can identify the source of an incorrect or an unexpected outcome. To visualize the flow of data during program execution, a breakpoint can be used to pause the execution of a VI at a specific location.

Profile tool

Timing and memory usage information – in other words, how long a VI takes to run and how much memory it consumes – can be gathered with the Profile tool. It is required to make sure that a VI is stopped before setting up a Profile window.

An effective way to become familiar with LabVIEW programming is to review examples. In the lab that follows, we explore most of the key LabVIEW programming features by building simple VIs.

Containers and decoration tools

Containers and Decoration tools can be used to organize front panel controls and indicators. Container tools are grouped in the Containers pallete (Controls Modern Containers Classic Classic Containers) and Decoration tools are grouped in the Decorations pallete (Controls Modern Decorations) .

One can use Tab Control (Controls Modern Containers Tab Control Classic Classic Containers Tab Control) to display various controls and indicators within a limited screen area. This feature helps one to organize controls and indicators under different tabs as illustrated in [link] . To add more tabs or delete tabs, right-click the border area and choose one of the following options: Add Page After , Add Page Before , Duplicate Page or Remove Page .

Tab Control

Questions & Answers

what is phylogeny
Odigie Reply
evolutionary history and relationship of an organism or group of organisms
AI-Robot
ok
Deng
what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, An interactive approach to signals and systems laboratory. OpenStax CNX. Sep 06, 2012 Download for free at http://cnx.org/content/col10667/1.14
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'An interactive approach to signals and systems laboratory' conversation and receive update notifications?

Ask