I couldn’t live without “Array of VData to VCluster” (video)

Posted on Saturday 14 February 2009

This is another article in a series showing some of my favorite OpenG VIs — “The OpenG VIs that I couldn’t live without“. In this article, I’m going to show a very useful VI, Array of VData to VCluster, that is used for converting arrays into a clusters.  The benefit of using this function, is that, unlike the Array to Cluster primitive, it defers type checking to run-time.

Here’s a short, 5 minute video showing how to use this function:

If you want to give this VI a try, you can obtain it using VI Package Manager (VIPM). Simply select the OpenG LabVIEW Data Tools (oglib_lvdata) package from within VIPM. Once installed, this will add a new functions palette at OpenG>>OpenG LabVIEW Data Tools.  (See here for a quick guide on how to install OpenG on VIPM.)

5 Comments for 'I couldn’t live without “Array of VData to VCluster” (video)'

    February 14, 2009 | 6:52 pm

    Monkey brid fish!

    February 14, 2009 | 6:56 pm

    What sort of performance hit (time and/or memory), if any, do we get using the OpenG vCluster VIs over the primatives?

    February 15, 2009 | 9:11 am

    I haven’t done any profiling of the OpenG Array of VData to VCluster function, but I’m sure that the Array to Cluster primitive is pretty fast. This operation concatenates the array type descriptors together and concatenates the array element data. If the primitive is used, the type descriptor portion can be done at edit-time and only the array elements data need to be concatenated at run-time.

    The source code is all there, so if you want to know more, take a look. If you discover anything interesting, feel free to post back your results. :)

    Ton Plomp
    February 15, 2009 | 12:54 pm

    In recent version of LabVIEW you can even do without the local:
    See on LAVA.


    February 15, 2009 | 1:18 pm

    Ton: Thanks for the tip. One thing to consider before trying to use this feature is that the backwards type propagation from the indicator terminal into the Variant to Data function will not pass through structures. And, since It is a best practice to always wrap subVIs in an error case structure and to put the indicator terminals outside the case structure, there aren’t really any practical ways to utilize this feature — I always use a local variable (or typedef constant) to set the data type of the Variant to Data function.

Leave a comment



Information for comment users
Line and paragraph breaks are implemented automatically. Your e-mail address is never displayed. Please consider what you're posting.

Use the buttons below to customise your comment.

RSS feed for comments on this post |


Bad Behavior has blocked 772 access attempts in the last 7 days.