Name: Array Function XNodes
Submitted: 03 Jul 2009
File Updated: 18 Jun 2012
LabVIEW Version: 8.6
License Type: BSD (Most common)
lava_lib_LabVIEW_API_array_xnodes v126.96.36.199 by University of Leeds
Author: Gavin Burnell
Copyright: Copyright © 2011, University of Leeds
Compatible LabVIEW Versions: >= 8.6.
Compatible OS Versions: ALL.
This is a collection LabVIEW 8.6.1 XNodes.
What is an XNode ?
An XNode is a type of LabVIEW library (like a LVOOP class, XControl) that defines a collection of vis that provide on-the-fly scripted nodes on on the block diagram in LabVIEW. In other words, they allow you to create a node whose code is generated programatically as it is dropped on the block diagram or when inputs are changed. This allows the developer to simulate some of the effects of LabVIEW's builtin primitives such as polymorphism, node resizing and edit time configuration.
Unfortunately, it is not possible to edit XNodes in the regular IDE (unless you work for National Instruments) as they are locked in the IDE. However, the individual vis are not necessarily locked and either by editing the xml file of the XNode directly, or with the help of some third party tools listed below, it is possible to edit and implement new XNodes.
For a fuller introduction, you are rrecommend to read Adam Rofer's "XNodes - A Crash Course" presentation (http://lavag.org/fil...urse-powerpoint).
For developing XNodes I use (a slightly modified) XNode Manager by Aitor Solar (http://lavag.org/fil...7-xnode-manager).
There are also a couple of ini file settings that make it easier (but still not trivial) to debug XNodes:
At all times remember that XNodes are not a supported technology as far as NI is concerned (as of LV 2011 anyway) and you should expect neither sympathy nor support from NI if bad things happen as a result of using them.
This package contains the following XNodes:
* Array Dimension.xnode
This XNode will return the n'th dimension of the input array, or -1 if the use specifies a dimension number greater
than the number of dimensions of the array or a dimension less than 0. In terms of primitives this is a combination
of an Array-Size and Index Array with some bounds testing. This XNode itself uses the Array Dimension Array.xnode
* Array Size and Index
Gives the dimensions of an array on separate outputs - in effect what you get by doing an array size and then index array on the array dimensions array.
* Array Dimension Array.xnode
This XNode operates in a fashion similar to the Array size primitive Xnode except that it always returns an array
of sizes of dimensions. For a 1D array, this is an array with 1 element, for n-D arrays where n>1, this is the same as the primitive and for scalar inputs, returns a zero length array.
* Filter Array
This XNode splits the input array into two sub arrays according to a boolean array input - one for elements where the boolean filter was true and the other where the filter was false.
* Foreign Key Sort
Sorts one array based on the sort order of a second array - useful when you have an array of items and an array of keys and you want the first array elements in order of their keys.
* Shuffle Array
The inverse of an array sort - randomises the order of the elements of an array. For 2D arrays it can randomise either the rows, columns or both rows and columns.
* Unindex and Unbundle.xnode
Performs the inverse of Index and Bundle Cluster Array. Takes an input array of clusters and un-indexes and unbundles each cluster and returns arrays of each element of the original clusters. This is equivalent to feeding
a cluster array into a for loop with auto-indexing turned on, unbundling all elements, and wiring back out of a for
loop with auto-indexing turned on in order to generate arrays of each element.
* Minimum Array Size
This XNode will take the input array and either make it at least n elements long, or exactly n elements long. If additional elements are needed, the default value for the element is used and the new elements are appended to the end of the array. For the fixed-size variant, if elements are to be removed, they are removed from the end of the array.
NB If upgrading from an older version of the package, you may notice some XNodes that implemented the OpenG array functions are no longer included. They (along with implementations of all the OpenG Array tools can be found on the LAVA Code repository as a separate package.
This Package depends on these other packages:
lava_lib_labview_api_scripting_tools >= 0.21.5.15
Click here to download this file