LAVA: [Discuss] Array Function XNodes - LAVA

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Discuss] Array Function XNodes Rate Topic: -----

#1 User is offline   gb119 

  • Very Active
  • Group: Premium Member
  • Posts: 155
  • Joined: 21-January 06
  • Location:Leeds, UK
  • Version:LabVIEW 8.6
  • Since:1995

Posted 03 July 2009 - 05:22 AM

Posted Image
Name: Array Function XNodes
Submitter: gb119
Submitted: 03 Jul 2009
File Updated: 20 Oct 2009
Category: XNodes
Version: 1.01.01
LabVIEW Version: 8.6
License Type: BSD (Most common)

Copyright © 2007, University of Leeds, UK
All rights reserved.

Author:
Gavin Burnell
--see readme file for contact information

Description:

This is a collection LabVIEW 8.2 XNodes.

XNodes are a hidden and unsupported feature in LabVIEW 8.x. As such, this code may not necessarily work in versions of LabVIEW > 8.2 and the technology is not supported by NI. On the otherhand they are really quite useful.

To use the XNodes, place the *.xnode files onto a function pallete and then use them as any other primitive or sub-vi. Because XNodes are scripted at edit time they offer a form of polymorphism far superior to polymorphic vis.

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 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.

* OpenG Style Filter Array

This XNode is a drop in replacement for the OpenG Filter Array polymorphic sub-vi. Because this is an XNode it will handle any array type and not just the specific polymorphic instances of the OpenG toolkit. Additionally the XNode can return included or excluded elements and for string arrays can do a regular expression test.

* 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.

* Foreign Key Sort

This XNode will sort an array of anything according to a second array of 'keys', returning the reordered array and the sorted keys. This is useful when you have an array whose elements are not directly sortable, but where you can create a sorting key for them. Optionally reverses the sort as well.

Dependancies:

My Scripting Tools toolkit, version 0.16.01 or better. Available also from LAVA repository on:
http://forums.lavag....ads-file87.html

I strongly recommend unzipping this and the Scripting Tools into the same directory and preserving the directory names. This should be sufficient to get correct linkage of the vi's. If things don't seem to work (XNodes not dropping correctly) try to mass compile the directory where you unpacked both zip files).

Change Log:
1.01.01 Fixed a bug in Unindex and Unbundle that stopped it working on a type-def'd array.
Added the Update State with Ref ability to allow newerversions to replace older versions of XNodes without breaking things.
Added the Foreign Key Sort XNode
1.00.01 Initial Lava submission.

Click here to download this file
Gavin Burnell
Lecturer in Condensed Matter Physics and EPSRC Advanced Research Fellow
School of Physics and Astronomy
University of Leeds, UK
http://www.stoner.le...ac.uk/people/gb
0

#2 User is offline   gb119 

  • Very Active
  • Group: Premium Member
  • Posts: 155
  • Joined: 21-January 06
  • Location:Leeds, UK
  • Version:LabVIEW 8.6
  • Since:1995

Posted 03 July 2009 - 09:16 PM

The latest version of this (including a 8.6.x version) is available via the LAVACR subversion vepository on Google (http://code.google.com/p/lavacr/). As and when I regain ownership of the code repository file, I'll post an updated version of the array XNodes. Future developments will all be in 8.6 or greater.
Gavin Burnell
Lecturer in Condensed Matter Physics and EPSRC Advanced Research Fellow
School of Physics and Astronomy
University of Leeds, UK
http://www.stoner.le...ac.uk/people/gb
0

#3 User is online   Michael Aivaliotis 

  • MindFreak
  • View gallery
  • Group: JKI
  • Posts: 2,389
  • Joined: 13-October 02
  • Version:LabVIEW 2009
  • Since:1994

Posted 04 July 2009 - 07:12 PM

View Postgb119, on 03 July 2009 - 02:16 PM, said:

The latest version of this (including a 8.6.x version) is available via the LAVACR subversion vepository on Google (http://code.google.com/p/lavacr/). As and when I regain ownership of the code repository file, I'll post an updated version of the array XNodes. Future developments will all be in 8.6 or greater.

You might want to leave this as it stands for those that only have LV 8.2. Renaming it to [LV8.2]Array Function XNodes. Then create a new submission with the 8.6 version.
Thank You
Michael Aivaliotis
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic