Professional Documents
Culture Documents
Add
Find on the palette
to the block
diagram
cluster is the cluster whose value you want to change. If you do not wire
this input, the function creates a cluster. If you wire cluster, the Bundle
function replaces the elements of cluster with element 0..n-1. If you
wire a cluster, the number of input terminals must match the number of
elements in the input cluster.
element 0..n-1 accepts any data type.
output cluster is the resulting cluster.
Bundle Details
Resize this function to indicate the number of elements in a new cluster. You cannot
resize this function when an existing cluster is wired to the cluster input.
When you create a new cluster, you must wire all the inputs. The elements in the output
cluster must appear in the same order as the input elements. When you wire an existing
cluster to the middle terminal of this function, the inputs are optional. LabVIEW
replaces only those cluster elements that you wire.
Local Variable
Owning Palette: Structures
Requires: Base Development System
Use local variables to read or write to one of the controls or indicators on the front panel
of a VI.
When you create a local variable, a local variable icon for the object appears on the
block diagram. Writing to a local variable is similar to passing data to any other
terminal. However, you can write to a local variable even if it is a control or read from a
local variable even if it is an indicator. In effect, with a local variable, you can access a
front panel object as both an input and an output.
Add to
Find on the palette
the block
diagram
array or element can be any n-dimensional array or scalar element.
All inputs must be either elements and 1D arrays or n-dimensional and
(n-1)-dimensional arrays. All inputs must have the same base type.
appended array is the resulting array.
If the inputs are all arrays of the same dimensionality, right-click the function to remove
the checkmark next to or select the Concatenate Inputs shortcut menu item. If the
inputs do not have the same dimensionality, Concatenate Inputs is automatically
selected and cannot be deselected. If all the inputs are scalar elements, Concatenate
Inputs is automatically deselected and cannot be selected, and the output is a 1D array
containing the elements in order.
When you select Concatenate Inputs from the shortcut menu, the glyphs in the Build
Array icon change to distinguish between the two input types. Inputs with the same
dimensionality as the output show an array glyph, while inputs with a dimensionality
that is one less than the output show an element glyph.
Example
Refer to the Build Array VI in the labview\examples\Arrays directory for an example of
using the Build Array function.
Open example
Property Node
Owning Palette: Application Control VIs and Functions
Requires: Base Development System
Gets (reads) and/or sets (writes) properties of a reference. Use the property node to get
or set properties and methods on local or remote application instances, VIs, and objects.
You also can use the Property Node to access the private data of a LabVIEW class.
The Property Node automatically adapts to the class of the object that you reference.
LabVIEW includes Property Nodes preconfigured to access XML Properties, VISA
properties, .NET properties, and ActiveX properties.
Details
Add
Find on the palette
to the block
diagram
reference is the refnum associated with the object for which you want to
set or get properties. If the Property Node class is Application or VI, you
do not have to wire a refnum to this input. For the Application class, the
default is the current application instance. For the VI class, the default is
the VI containing the Property Node.
You also can wire a LabVIEW class to the reference input to access the
private data of the LabVIEW class.
error in describes error conditions that occur before this node runs. This
input provides standard error in functionality.
property 2..n are examples of properties you want to set (write).
reference out returns reference unchanged.
error out contains error information. This output provides standard error
out functionality.
property 1..n are examples of properties you want to get (read).
If the Property Node opens and returns a reference to an object, use the Close Reference
function to close the reference.
Move the cursor over terminals in the Property Node to display more information about
the property in the Context Help window. You also can right-click a property terminal
and select Help For Property from the shortcut menu, where Property is the name of
the property.
You can read or write multiple properties using a single node. However, some properties
are not readable and some are not writable. Use the Positioning tool to resize the
Property Node to add new terminals. A small direction arrow to the right of the property
indicates a property you read. A small direction arrow to the left of the property
indicates a property you write. Right-click the property and select Change to Read or
Change to Write from the shortcut menu to change the operation of the property.
The node executes from top to bottom. The Property Node does not execute if an error
occurs before it executes, so always check for the possibility of errors. If an error occurs
in a property, LabVIEW ignores the remaining properties and returns an error. If you
right-click the Property Node and select Ignore Errors Inside Node, LabVIEW
executes the remaining properties on the Property Node. Only the first error is returned
by the Property Node. The error out cluster contains information about which property
caused the error.
Properties have a short or long name that you can change by right-clicking and selecting
Name Format from the shortcut menu. The No Names format displays only the data
type for each property.
Note You can right-click the Property Node and select Downcast to Class from
the shortcut menu to typecast a reference to a more specific class in the
inheritance hierarchy. For example, select Downcast to Class from an
Interchangeable Virtual Instruments (IVI) class driver to view the IVI specific
driver properties. This item is not supported for all class types. If Downcast to
Class is disabled, you can use the To More Specific Class and To More Generic
Class functions.
Submit feedback on this topic.
Add
Find on the palette
to the block
diagram
value 0..n-1 can be a number or Boolean value, an array of numbers or
Boolean values, a cluster, array of clusters, and so on. You can wire a
waveform to only one value input. If an input is a waveform, you can
have an unlimited number of scalar inputs of varying sizes. If value is an
error cluster, only the status parameter of the error cluster passes to the
input terminal.
result returns the result of the selected operation applied to the value
0..n-1. For AND, OR, or XOR, result returns the bitwise operations on
numeric inputs and logical operations on Boolean inputs.
Case Structure
Owning Palette: Structures
Requires: Base Development System
Contains one or more subdiagrams, or cases, exactly one of which executes when the
structure executes. The value wired to the case selector determines which case to
execute.
Waits the specified number of milliseconds and returns the value of the millisecond
timer. Wiring a value of 0 to the milliseconds to wait input forces the current thread to
yield control of the CPU.
This function makes asynchronous system calls, but the nodes themselves function
synchronously. Therefore, it does not complete execution until the specified time has
elapsed.
Details
Add
Find on the palette
to the block
diagram
milliseconds to wait specifies how many milliseconds to wait. This
function does not wait for longer than 0x7ffffff or 2,147,483,647 ms. To
wait for a longer period, execute the function twice. Wiring a value of 0
to this parameter forces the current thread to yield control of the CPU.
millisecond timer value returns the value of the millisecond timer after
the wait.
Add
Find on the palette
to the block
diagram
upper limit, x, and lower limit should usually be of the same data type
structure, either arrays or clusters, but they can have different numeric
representations. For example, if you change one of the data types to an
array, you must change the remaining data types to arrays to avoid broken
wires. However, you can wire an array to x and two scalars to upper
limit and lower limit. You also can wire double-precision, floating-point
and integer data.
coerced(x) returns the coerced or unchanged value of x. If x is within the
range set by the upper limit and lower limit inputs or if the function is in
Compare Aggregates mode, the value is unchanged. If x is not in range
and the function is in Compare Elements mode, the function converts the
value to the same value as upper limit or lower limit. If upper limit, x,
or lower limit is NaN, coerced(x) is NaN.
In Range? is a Boolean value in Compare Aggregates mode. In Compare
Elements mode, the data type structure of In Range? matches the data
type structure of x, with each scalar replaced by a Boolean value. If
upper limit, x, or lower limit is NaN, In Range? is FALSE.
This function compares the input data values according to the Boolean comparison
rules. If the function is in Compare Aggregates mode, it returns the unchanged value of
x in coerced(x) rather than a coerced value. The function considers each input array as a
single aggregate object, similar to a cluster, where the first element is primary in the
comparison. If x is greater than upper limit and the function is in Compare Elements
mode (default), the function coerces x to the upper limit value. If x is less than lower
limit and the function is in Compare Elements mode, the function coerces x to the lower
limit value.
If you wire a combination of signed and unsigned integers to the upper limit, x, and
lower limit inputs of the In Range and Coerce function, all of the inputs will be coerced
to the same unsigned integer type. This can lead to unexpected results for negative input
values. For example, wiring an unsigned integer to upper limit and a negative signed
integer to lower limit may cause LabVIEW to interpret the lower limit input as larger
than the upper limit input. To avoid this issue, convert integer inputs to the same type
before you wire them to the In Range and Coerce function.
By default, In Range And Coerce includes the lower limit value in the range, as
indicated by the solid black diamond at the lower limit input. By default, the upper
limit value is not included in the range, as indicated by the empty diamond at the upper
limit input.
To change whether the function includes the value wired to upper limit or lower limit,
right-click the function and select Include upper limit or Include lower limit from the
shortcut menu to include or remove the value in the range. These options only affect the
result of In Range?. The function always coerces x to the exact values of upper limit
or lower limit, regardless of whether you select Include upper limit or Include lower
limit from the shortcut menu.
If the lower limit value is greater than the upper limit value, In Range? is always
FALSE and LabVIEW switches the lower limit value and the upper limit value
internally before computing coerced(x).
Example
Refer to the In Range and Coerce VI in the labview\examples\Comparison directory for
an example of using the In Range and Coerce function.
Open example
Description
Message
to
Contains the text to display in the dialog box.
Display
Contains the following options:
Buttons
to
Display
Description
Message
Enable
error in
Description
OK
Returns TRUE when you click the first button in the dialog box and
FALSE when you click the second button.
error
out