Jump to content


Post code here that is not ready for certification. Once it is ready for certification please notify the moderators. It will then be moved to the proper category.

70 files

  1. TLB - Top-Level Baseline

    This is the official release of my LV State Machine template; the TLB - Top-Level Baseline. It was presented at the State Machine vs. State Machine presentation at NI Week 2010.
    This is worth using because it implements most of the common functionality that you end up creating w/ most / all LV state machines anyway:
    Error handling Idle cases Interactive event driven execution Shutting down parallel loops gracefully String based queued states Handling the Panel Close? event
    Some techniques used are not immediately intuitive, but each design decision was made with the idea of scalability and ease of use in mind.
    Please post your 'Why did you do that?' questions and I'll gladly inform and instruct why the design choices were made (including why did I use colors)



  2. LVOOP Custom User Scripting

    LVOOP Custom User Scripting v1.1.1-1
    Copyright © 2009, Jonathon Green; JGCODE
    All rights reserved.
    Author: Jonathon Green
    LAVA Name: jgcode
    Contact Info: Contact via PM on lavag.org
    LabVIEW Versions:
    LabVIEW 2009
    No Dependencies
    Contains Custom User Scripting Hook VIs which are called at the end of their respective scripting processes e.g. New>>VI for Data Member Access...
    New scripting includes:
    - BD control labels to left
    - BD indicators labels to right
    - BD controls moved closer to case structure's left hand side border after label repositioned
    - Case structure expanded downwards and free label placed under error wire with default "Comment"
    - FP controls (excluding owning class or error in) labels bolded to match required parameter on connector pane
    Array and MultiDim Array Only
    - Index/Indices control moved outside case structure inline with other controls
    - Data Member control and Index/Indices control switched on connector pane
    - Index/Indices control set as required parameter on connector pane
    - FP reflects new connector pane order
    Other features includes:
    - Default save name for Write Method changed from "Write " to "set"
    - Default save name for Read Method = "Read " to "get"
    Hooks are installed in the (LabVIEW 2009)\resource\Framework\Providers\LVClassLibrary\NewAccessors directory
    This package installs the following hooks:-
    Scalar Data Member - BaseAccessorScripter\Custom User Scripting For New Simple Accessor VI.vi
    1D Array Data Member - ArrayElementScripter\Custom User Scripting For New Array Element Accessor VI.vi
    2D+ Array Data Member - MultiDimArrElemScripter\Custom User Scripting For New MultiDim Array Element Accessor VI.vi
    See here for more information
    All existing hooks will first be moved to a persistant folder (\addons\_JGCODE Toolkits\lvoop custom user scripting\NewAccessors Original).
    The packaged hooks will then be installed.
    If the packaged scripting does not match your style then they may server as a useful example.
    Installation and instructions:
    Install the package using VIPM.
    At unistall, the packaged hooks will be unistalled and replaced by the original hooks.
    Open Examples\Test.lvclass
    Right click on the Test.lvclass and select New>>VI for Data Member Access...
    Select a read and write template for Simple, Array and MultiDim Array .
    Inspect the FP and BD of the new VIs created to see the additional scripting.
    Save the Simple write method to see the new default save name of "setSimple.vi".
    Save the Simple read method to see the new default save name of "getSimple.vi".
    Known Issues:
    All - If a template name already exists LabVIEW will change it to a default. This will usually occur for arrays where the data member name is not used, but rather the element name of an array.
    Array (Read/Write) - Comment is sitting on Index Control's wire
    Read - Index control not in line with Index Array function
    MultiDim Array (Write) Indicies control not in line with Index Array function
    Stephen Mercer (AQ)
    ICON Technologies
    François Normandin
    Version History (Changelist):
    1.1.1-1 2009 12 22
    [New] Renamed packaged, designated old package as conflict
    [New] Updated .zip name to include LabVEIW Version (LAVA CR Certified requirement).
    [New] Dependencies included in package
    [Fix] Removed CLSUIP_LocalizedStrings.vi so as not to distribute NI VIs (LAVA CR Certified requirement).
    [Fix] Changed nameing convention to retain capitalisation.
    1.1-1 2009 11 27
    [New] Added support for when "Include Error Handling Terminals" is unselected
    [New] Default save names included. Write: set; Read: get (where is the Data Member Name in camel notation)
    [Fix] VIPC file now does not contain packages, it is a list only
    [Fix] Removed Quick Drop dependency
    1.0-2 2009 11 17
    [New] Added VIPC file for dependencies
    1.0-1 2009 11 17
    [New] Initial release of the code (LabVIEW 2009).
    If you have any problems with this code or want to suggest features:
    please go to lavag.org and Navigate to LAVA > Resources > Code Repository (Certified) and search for the LVOOP Custom User Scripting support page.
    This code was downloaded from the LAVA Code Repository found at lavag.org



  3. GetSnippet

    GetSnippet RCF Plugin v1.0.0
    Copyright @ 2009, Jim Carmody
    All rights reserved.
    Author: Jim Carmody
    LAVA name: jcarmody
    Contact Info: Contact via PM on www.lavag.org
    LabVIEW version:
    Created and tested with LabVIEW 8.2
    JKI Right-Click Framework
    LabVIEW 8.2 or higher
    The Code Capture Tool 2.0 can create a VI snippet in LV versions as old as 7.0; this plugin lets you extract them in versions 8.2 and above. Standard conditions apply - you won't be able to extract a snippet that was created in a newer version of LabVIEW.
    Extract the zip file into [LabVIEW]\Resource\JKI\RCF\Plugins\GetSnippet and restart the RCF framework. Once installed, select a snippet, activate the RCF and select GetSnippet and your decoration will be replaced by the underlying code.
    Known Issues:
    Hardly anybody makes snippets in anything except LabVIEW 2009. The program works fine, though.
    Ton Plomp and Yair gave us the Code Capture Tool, without which there would be no need to extract snippets in LabVIEW < 2009.
    Darin.K showed me how to get a VI from a snippet. Ton helped me improve my implementation.
    Change Log:
    v1.0.0: Initial release of the code.
    If you have any problems with this code or want to suggest features:
    please go to www.lavag.org and Navigate to
    LAVA > Resources > Code Repository (Certified) and
    search for the "Abort.vi" support page.
    This code was downloaded from the LAVA Code Repository found at www.lavag.org



  4. GPower toolsets package

    This is a submission for the GPower toolsets palette, which will also shortly be available on the NI LabVIEW Tools Network. I submit it to Lava to (of course) share it with everyone, but also to establish an open forum to discuss improvements and to provide support. Much better than hiding all this in private email conversations with each user.
    The toolsets are compiled for LV2009 SP1, are provided as VIPs for VIPM, and will mass compile to at least LV2010 and LV 2011 without problems (this happens automagically during the VIP-install process for those of you that don't know VI Package Manager ). The 'gpower_lib_toolsets-' is an umbrella for the four other VIPs, it doesn't add anything extra by itself.
    Currently this consists of 4 toolsets:
    Dynamic Dispatch
    Open, pass data to (without using the front panel), run, and close dynamic VIs. A cumbersome process using VI Server made easy with this toolset.
    Streamline common error wire tasks such as set, filter and clear errors and warnings, and unbundle the error cluster. Adds advanced features such as dynamic setting of custom global errors, that you can invoke from anywhere in your application, and bundling errors into a single error wire. No more need for arrays of error clusters!
    Calculate elapsed and remaining time, and abort a running Wait function for instance.
    High performance "global variables" that lets you pass data between any corners of your application. It's based on queues, so a "global" that does not involve using front panel controls, files, or the LV project - it all happens in the block diagram. In most cases you don't even have to pass a refnum around, just drop a VIRegister somewhere and you're done.
    If this thread generates too much noise across the different toolsets, we could split this into 4 submissions. But lets see how it goes. More toolsets are awaiting release, but I'll start with these four to get a feel for the process.



  5. quick create a new vi from template

    Copy the contents to LabVIEW xxxx/resource/plugins
    Speed up creating new vi's from templates!
    It's using the 'new vi'-hook to create the new vi from a custom template. A plugin architecture allows to map different templates to the keyboard.
    For a quick-start, try Ctrl+N followed by 'H' (without releasing the Ctrl key).
    Detailed Description:
    When using

    New -> Blank VI from the Startup Window File -> New VI from the menu of any vi or the Ctrl+N shortcut the lv_new_vi.vi hook is called.
    Releasing of the Ctrl key (when using the shortcut) uses the Default.vit. The next key-press k creates a new vi from the template [...]/plugins/lv_new_vis/templates/k.vit. This is case insensitve and only works with a..z and SPACE. If no template is found or if an error occures, the default action of LabVIEW (empty vi) is performed (Failsafe).
    In addition to normal vi templates it supports global vi templates and control templates.
    Even more customization is possible using special tags on the vi or vit. Use
    [...]/plugins/lv_new_vis/tools/lv_new_vi__TagEditor to read and set them:
    isBD_ToFront? bring the block diagram in front instead of the front panel isRunMe? will instead run the vi in the template folder. Use this for wizards, more sophisticated scripting and other dialogs.
    Examples (V0.9.3: seperate ogp package):
    Try the following keys to see the different possibilities:

    f: normal vi, FP at front b: BD at front g: global vi c: control w: wizard h: help You do not need to delete the demo templates, a w.vit will load even with w_example.vit present.
    Compatibility: Developed in good old 7.1 and tested with 2010. I don't know if it works nicely with the project explorer and did never try to use it with projects, libraries and classes.
    Planned Features:
    * Error logging
    * Redirections via Config file (I will link the standard templates) (Edit: It's faster to just place them in the templates folder.)
    V 0.9.1
    Fixed issues with the Application Instances of LV8.0 and higher.
    Wizards are still launched in the diaolog App.Instance, they need to get the default App on their own.
    V 0.9.2
    Changes: Closing all references
    Beta: Uses VI Activation Event to abort when the user switched to a different app. (See discussion for details).
    V 0.9.3
    Uses VI Activation Event to check Ctrl-Key when user switches from a diffrent application.
    Now available as packages (ogp). Uses a seperate package for the examples.
    V 0.9.4
    Fixed issues with 0.9.3: After start of LV, Ctrl+N didn't work the first time
    Enjoy, Felix



  6. Mercurial API

    An API for the Mercurial command line interface (hg), includes all the basic commandos:

    The API provides an interface to communicate with a Mercurial Repository.This API is not meant as a integrated Mercurial provider in LabVIEW.
    Installation is performed by VIPM, after which a palette is created in the user.lib palette.
    You can access the sourcecode of this API at Bitbucket.
    Licensed under GPLv2, since it creates a derivative on the Mercurial icon. © Matt Mackall
    Copyright © 2012 Ton Plomp
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.



  7. Encryption

    This package consist of a series of tools in native LabVIEW 2010 code.
    For encryption/decription the AES (Rijndael) routine is used with key sizes of 128, 192 and 256 bytes.
    The encryption supports the following block modes:

    For signing of string/packages it performs the SHA-1 and SHA-2 hashing, for MD5 hashing the OpenG functionality is used.
    The hash functions return a binary string and a hex-formatted string with the hash.
    The following hashes are supported:
    MD5 (via OpenG library)
    SHA-2 224 bit
    SHA-2 256 bit
    SHA-2 384 bit
    SHA-2 512 bit

    For Hashed key authentication the HMAC functionality is provided based on the supported hash functions.
    The used functions are tested against NIST public test vectors.
    The use of these functions is not: secure the code does not try to protect it's memory nor the used keys.
    © Ton Plomp 2011 - No warranty implied.



  8. Data Broadcasting Library for Actor Framework

    Use v1.0.0 for LabVIEW 2011-2012.
    Use v1.1.0 for LabVIEW 2013+.
    The attached library provides extensions to the Actor Framework to facilitate the broadcast of messages from one actor to several others. Listeners subscribe to a message when they want to receive it from the Broadcaster, and they unsubscribe when they want to stop receiving it. The library provides a set of common interfaces that decouple Broadcasters from Listeners so any two actors in a messaging hierarchy can communicate via broadcast without having the same caller.
    This library extends the Actor Framework; it does not modify the core framework in any way, so it may be used in existing projects as well as new ones.
    Documentation for the library and the included example program is attached.



  9. SET Localization Toolkit

    The SET Localization Toolkit provides more convenient edit-time language switching support for LabVIEW 2013 projects.
    UI text is extracted from an existing project and stored in a localization file. Additional languages can be added then applied to the project using the apply language wizard.
    The idea is to be able to quickly apply a language to a project before distribution. Applying the language at edit-time allows you to fix up the UI in the target language. Change fonts and re-size controls so that it looks right before compiling it.
    - No modification of project's source code required. No additional dependencies.
    - Support for switching code pages.
    - Ability to define shared resources.
    - Resources referenced via UID. Changing labels of control does not break linkage.
    - Resources can be exported to CSV file for external translation.
    - Resources stored as UTF-16LE text.
    - Ability to translate RTM files.
    - Unicode support enabled in the LabVIEW.ini file
    - Download the ".vip" file and install using VI Package Manager 2014
    - Make sure that "UseUnicode=True" is set in the "labview.ini" file
    - From within any LabVIEW window, select "Tools->LAVA->SET Project Editor"
    GitHub: https://github.com/rfporter/SET-Toolkit



  10. Chess Game

    (latest version 5.5 - November 3, 2015 - LabVIEW 2010)
    Chess Game with artificial intelligence 100% LabVIEW
    AI : algorithm MinMax + Alpha-Beta pruning
    two game levels : "novice" and "Jedi"
    editing interface  (edit on/off)
    a) moving mode : left-clic on the starting square, left-clic on the destination square
    b) positioning mode : right-clic on a square opens a context menu to choice the piece.
    This engine 5.5 is stronger than the previous engine 5.0 (Jedi level)
    unzip - run "Chess_ouadji.vi"
    Have fun!  
    if you like this Chess Game, a kudo is most welcome!  (here - first post)



  11. Mandelbrot Explorer

    Simple Mandelbrot explorer that I wrote a few years ago.



    Many predefined color pallets

    Rolling color pallet to produce motion effect

    Ability to customize the color pallet

    Log color mapping

    Keyboard or mouse control

    Basic shortcut keys

    Saving high res images


    Needed improvements

    Clustering to clean up code more

    Save settings



    Load project in LabVIEW 2015 32/64 bit

    Start program using Mandelbrot Main.vi



  12. Tab into cluster contents

    Copyright 2015, Merecs Engineering GmbH&Co. KG
    All rights reserved.
    Christoph Deus
    This code has been tested to run under LabVIEW 2014.
    - Enables Tabbing into and out of Cluster-Controls
    - Also works with Clusters on Tab-Controls
    If you have any problems with this code or want to suggest features, please let me know or post to the LAVA forum.
    Version History:
    Initial release of the code.



  13. U8 Array 2 Space Delimited String

    "Converts U8 Array into Space Delimited String".. This is a very simple code but often times very handy when you are in a hurry writing your code and want to finished asap. Description: it will convert a u8 hex array into a space delimited hex string. please let me know if you have concern or question regarding this LabVIEW code. Autthor: Sherwin Tiongson..



  14. Multi Column ListBox with 2 selections only

    I had a need for a multi-column list box and i needed only 2 selections for the user to make, well in labview they did not have that option it's either 1 or 3 or more. So i made this little adapter to suit my needs.



  15. FPRefs2VariantAttributes

    The VI acquires all front panel control (and indicator) references and one by one passes them into a variant using its attributes. This way of storing the references makes them faster to be found within an application than by storing them in a cluster along with their name and using "search 1D array". The idea of this use case came from a nugget by NI's Darren.



  16. Falk Schneider

    This snippet demonstrates how to handle the runtime contextmenu of various controls in one single dynamic event case. Notice how you only need to bundle the different references of all the controls into one "Register for Event" input. Discrimination between the different controls happens inside the dynamic event handling case as is shown here with singling out one control for which the conxext menu remains standard while for all other controls just a singular menu item is generated.
    This was created as an answer to the following post:
    LabVIEW version is 2013



  17. easy increment

    I have always found it frustrating that I cannot efficiently change numerical values with the mouse only. This is especially true when I'm simultaneously looking at a gauge on the other side of the room and changing values with my wireless mouse.
    "easy increment" selects individual decimal place values by moving the mouse across the spacial extent of a numerical control. Mouse wheel scrolling may then be used to to modify these values.
    It's easier to use than explain, I promise!



  18. Bluetooth Connect and Event Monitoring

    This VI can Discover, Pair, or Remove Bluetooth Device.  Can Connect or Disconnect (no data socket enabled yet),  Can establish a Comm Port, Open the Comm Port, Close A Comm port.
    Has the machinery but needs debugging for the Windows bluetooth Event Monitoring.  Any help would be VERY VERY WELCOME.
    I'm uploading this because I really wish somebody else had uploaded the necessary code for bluetooth pairing, but at the moment wish somebody else had uploaded code for monitoring bluetooth events (connect or disconnect events)



  19. Switch of Autoplay

    This VI accesses the registry and changes the Key that is responsible for Autoplay (WinXP). This should help against those worms/viruses that spread via USB Disks.



  20. Hooovahh Array VIMs

    Here is the Hooovahh Array VIMs.  This initial release contains VIMs for manipulating array data, which are intended to replace OpenG functionality, but with the added benefit of data type propagation, and increased performance using newer array manipulation techniques.  In later versions other Array manipulation functions were added moving all the OpenG stuff to their own palette. 
    Version 2.0 changed the suffix naming standard.  Updating may mean replacing calls to the new versions since the name on disk has changed.  This was for consistency and I'm sorry for breaking compatibility.  The added type defs in 2.0 may break compatibility too but these help avoid code breaking bugs since VIMs allowed any data type previously.
    Most of the OpenG functions are unchanged, but a few use the newer conditional and concatenating tunnels.  And a few functions have added performance based on other inputs.  For instance the Delete Array Elements can operate in a more efficient way if the input indexes are already sorted.  The Filter 1D array can also be more efficient if the input is known to not contain any duplicates.
    Because these packages contain VIMs, they require LabVIEW 2017 or newer.  Having these functions be VIMs mean all functions work with various array data types.  Included functions are:
    Conditional Auto-Indexing Tunnel Delete Elements from (1D or 2D) Array Filter 1D Array Index (1D or 2D) Array, Scalar, Row, Column Remove Duplicates from 1D Array Reorder (1D or 2D) Array Reverse 1D Array Slice 1D Array Sort (1D or 2D) Array Convert 1D to 2D Convert 2D to 1D Find Subarray Force Array Min/Max Size Foreign Key Sort



  21. Build Script

    Build Script v1.1.0
    Copyright © 2009, Jonathon Green; JGCODE
    All rights reserved.
    Author: Jonathon Green
    LAVA Name: jgcode
    Contact Info: Contact via PM on lavag.org
    LabVIEW Versions:
    LabVIEW 8.6
    LabVIEW 2009
    jki_lib_state_machine >= 2.0.0
    jki_rsc_toolkits_palette >= 1.1
    oglib_array >= 2.0
    oglib_appcontrol >= 2.0
    ogrsc_dynamicpalette >= 0.2
    oglib_error >= 2.0
    oglib_file >= 2.5
    Unit Test Framework (optional)
    Contains a build script for a LabVIEW Project. Use a build script in your development to automate the task of, and avoid errors when, creating deliverables. A sample project is included that creates an application, installer then archive (.zip) for a project. This build script supports the new 9.x build format by building the specs in a high level temp folder (e.g. C:\dist) to minimise errors occurring from the OS exceeding maximum number of characters in path. NI's Unit Test Framework (UTF) is supported or code can be added for other Unit Test APIs (see Unit Test Framwork.png for demo code).
    Installation and instructions:
    The dist folder contains build.vit and a library (.llb) of support code. See Examples section on how to use code.
    1. Open example\Project.lvprj
    2. Open and run build.vi, VI should complete execution with no errors
    3. Once build script has completed explore example\dist to view all builds (application, installer, zip)
    4. Unzip zip folder and install application
    5. Run the application
    6. "Build Works!" dialog should appear to indicate sucessful build
    7. Reuse script
    a. Use build.vit as starting template for project
    b. Edit the project details on the block diagram to match to new project
    Known Issues:
    No Known Issues
    Justin Goeres (JKI)
    Joel Spolsky
    JKI (JKI State Machine)
    ICON Technologies
    Version History (Changelist):
    1.1.0 2009 11 15
    [Fix] Code saved to LabVIEW 8.6 on request from LAVA member. Unit Test Framework VIs were removed due to build issue.
    [Fix] SubVIs added to a .lvlib within a .llb.
    1.0.0 2009 11 14
    [Feature] Initial release of the code (LabVIEW 2009).
    If you have any problems with this code or want to suggest features:
    please go to lavag.org and Navigate to LAVA > Resources > Code Repository (Certified) and
    search for the Build Script support page.
    This code was downloaded from the LAVA Code Repository found at lavag.org



  22. UDPErrorLoggingPurging

    This is a "simple" xNode that assolve two issues :
    -Purges error cluster data(eg.Clear the status boolean)
    -Sends UDP packet (containing error cluster data) to a Server to log errors or doing what else you want.
    See BlockDiagram of VI "UdpLoggerError HowTO.vi"
    Copyright © 2008-2009, Giovanni Terracciano
    VariantSistemi snc
    All rights reserved.



  23. UML2LV State Machin Compiler

    This is a toolkit to convert a state diagram designed with the editor dia into a LabVIEW state machine.
    Warning: This uses Scripting: So be aware of dragons, black holes, rusty nails and other monsters. I've only tested it in LV 7.1., got a crash every 2 hours... Bugs and workarounds in newer LV versions welcomed.
    Crashes in 8.5. Found the CAR (# 4CJFKTCS)). Edit: Fixed in V 1.0.1
    Basic Operation
    Create an uml Chart in Dia (it is OpenSource too).
    Compile it into a LabVIEW state machine (this will generate an enum based state machine with .vi and States.ctl for the TypeDefed Enum).
    Code the States.
    Getting started
    * You will need to have several OpenG packages installed. Dependencies: appcontrol, file, variantconfig. In order to install these, you need to get the VI package manager from:
    * For users of LV 7.x you need to get the TRefTraverse.llb from NI:
    From 8.0 onward they are located under vi.lib\utility
    Propably you need to fix the linking from the main vi
    * You will need to download Dia:
    * In the Folder LV Scripting you will find the template 'State Machine Prototype Template.vit'. You can modify this within limits to change the state machine that will be generated.
    * There is a lot of Documentation with the Code: Check out the documentation folder with the 'Tree VIs' and the uml diagrams (they are surprisingly also made with dia)
    * If you have questions, ideas or found a bug, please do not hesitate to contact me! You can do so via PM on LavaG or via my private email on the BD of the About.vi
    V 1.0.1:
    * Fixed a bug in error handling (Error Handler Close.vi)
    * Workaround for the 8.5 crash
    * Support for changed Name of CaseSelect
    * Started to add support for StarUML
    Happy New Year



  24. Waveform Class

    LabVIEW Versions:
    2010 SP1
    This is a reference based class for handling waveform data. The waveforms are pre-allocated for faster access. Methods allow you to append new waveforms, read the existing waveforms, read a subset of the existing waveforms, or read a decimated copy of the existing waveforms.



  25. Advanced Database Query

    This component automatizes the work of: format sql statement, execute sql query and build a cluster with data output.
    This function accept a sql statement with parameters like format into string and you can resize this function to the number of input parameters.
    The output data can be a cluster or an array of cluster defined double clicking on function.
    How to use:
    Wire db connection input.
    Wire sql statement with parameters like format into string function.
    Resizes the function with the number of parameters into sql statement,
    If the sql statement produces data output, double click on function to Edit columns of data outuput.
    Database conectivity toolkit
    Scripting tools
    This function isn't 100% complete. It's need to complete some abilities and code improvements. If anyone want help me, be welcome.
    My email is bitcosta@ig.com.br



  • Create New...

Important Information

By using this site, you agree to our Terms of Use.