Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Express VIs

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Use the Express VIs for common measurement tasks. Express VIs are nodes that require minimal wiring because you configure them with dialog boxes. The inputs and outputs for the Express VI depend on how you configure the VI. Express VIs appear on the block diagram as expandable nodes with icons surrounded by a blue field.

Refer to the Getting Started with LabVIEW manual for more information about using Express VIs.

Creating Express VIs as SubVIs

You can create a subVI from an Express VI configuration. For example, you might want to save the configuration of the Write To Measurement File Express VI for use as a subVI in other VIs you build rather than reconfiguring the Express VI every time. Right-click the Express VI and select Open Front Panel from the shortcut menu to create a subVI from an Express VI.

When you create a subVI from an Express VI, the front panel of the subVI appears. You then can edit the VI and save it. To save the values entered in controls, select Edit»Make Current Values Default or right-click each control and select Data Operations»Make Current Value Default from the shortcut menu. A new subVI displayed as an expandable node replaces the Express VI on the block diagram.

After you create a VI from an Express VI, you cannot convert the subVI back into an Express VI.

Dynamic Data Type

The dynamic data type appears as a dark blue terminal, shown as follows.

Most Express VIs accept and/or return the dynamic data type. You can wire the dynamic data type to any indicator or input that accepts numeric, waveform, or Boolean data. Wire the dynamic data type to an indicator that can best present the data. Indicators include a graph, chart, or numeric indicator. However, because dynamic data undergoes an automatic conversion to match the indicator it is wired to, Express VIs can slow down the block diagram execution speed.

The dynamic data type is for use with Express VIs. Most other VIs and functions that ship with LabVIEW do not accept this data type. To use a built-in VI or function to analyze or process the data the dynamic data type includes, you must convert the dynamic data type.

In addition to the data associated with a signal, the dynamic data type includes attributes that provide information about the signal, such as the name of the signal or the date and time the data was acquired. Attributes specify how the signal appears on a graph or chart. For example, if you use the DAQ Assistant Express VI to acquire a signal and plot that signal on a graph, the name of the signal appears in the plot legend of the graph, and the x-scale adjusts to display timing information associated with the signal in relative or absolute time based on the attributes of the signal. If you use the Spectral Measurements Express VI to perform an FFT analysis on the signal and plot the resulting value on a graph, the x-scale automatically adjusts to plot the signal in the frequency domain based on the attributes of the signal. Right-click a dynamic data type output terminal of a VI or function on the block diagram and select Create»Graph Indicator to display the data in a graph or select Create»Numeric Indicator to display the data in a numeric indicator.

The following table lists indicators that accept the dynamic data type and the type of data the dynamic data type can contain, and describes how indicators handle the data.

Data in Dynamic Data Type Indicator Result

Single numeric value

Graph

Plots the single value, includes time stamp and attributes

Single channel

Graph

Plots the whole waveform, includes time stamp and attributes

Multiple channels

Graph

Plots all the data, includes time stamps and attributes

Single numeric value

Numeric indicator

Displays the single value

Single channel

Numeric indicator

Displays the last value of the channel's data

Multiple channels

Numeric indicator

Displays the last value of the first channel's data

Single numeric value

Boolean indicator

Displays a TRUE value if numeric value is greater than or equal to 0.5

Single channel

Boolean indicator

Displays a TRUE value if the last value of channel's data is greater than or equal to 0.5

Multiple channels

Boolean indicator

Displays a TRUE value if the last value of the first channel's data is greater than or equal to 0.5

Converting from Dynamic Data

Use the Convert from Dynamic Data Express VI to convert dynamic data to numeric, waveform, and array data types for use with other VIs and functions. When you place the Convert from Dynamic Data Express VI on the block diagram, the Convert from Dynamic Data dialog box appears. The Convert from Dynamic Data dialog box displays options that let you specify how you want to format the data that the Convert from Dynamic Data Express VI returns.

For example, if you acquired a sine wave from a data acquisition device, select the Single Waveform option on the Convert from Dynamic Data dialog box. Wire the Waveform output of the Convert from Dynamic Data Express VI to a function or VI that accepts the waveform data type. If you acquired a collection of temperatures from different channels using a DAQ device, select the Most recent values from each channel and Floating point numbers (double) options. Then wire the Array output of the Convert from Dynamic Data Express VI to a function or VI that accepts a numeric array as an input.

When you wire dynamic data to an array indicator, LabVIEW automatically places the Convert from Dynamic Data Express VI on the block diagram. Double-click the Convert from Dynamic Data Express VI to open the Convert from Dynamic Data dialog box to control how the data appears in the array.

Converting to Dynamic Data

Use the Convert to Dynamic Data Express VI to convert numeric, Boolean, waveform, and array data to dynamic data for use with Express VIs. When you place the Convert to Dynamic Data Express VI on the block diagram, the Convert to Dynamic Data dialog box appears. Use this dialog box to select the kind of data to convert to the dynamic data type.

For example, if you acquire a sine wave using the Analog Input Traditional NI-DAQ (Legacy) VIs and want to use a Signal Analysis Express VI to analyze the signal, select the Single Waveform option on the Convert to Dynamic Data dialog box. Then wire the Dynamic Data Type output to an Express VI that accepts the dynamic data type as an input.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit