*Uncertified*
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
-
Chess Game
By o u a d j i
(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!
ouadji,
if you like this Chess Game, a kudo is most welcome! (here - first post)
2,580 downloads
Updated
-
Triple buffer
By CharlesB
(initial discussion, with other implementations here)
In the need for displaying large images at a high performance, I wanted to use triple buffering in my program. This type of acquisition allows to acquire large data in buffers, and have it used without copying images back and forth between producer and consumer.
This way consumer thread doesn't wait if a buffer is ready, and producer works at max speed because it never waits or copy any data.
If the consumer makes the request when a buffer is ready, it is atomically turned into a "lock" state. If a buffer isn't ready, it waits for it, atomically lock it when it is ready.
This class allows to have a producer loop running at its own rate, independently from the consumer. It is useful in the case of a fast producer faster than the consumer, where the consumer doesn't need to process all the data (like a display).
How to use
Buffers are provided at initialization, through refnums. They can be DVRs, or IMAQ refnums, or any pointer to some memory area.
Once initialized, consumer gets the refnums with "get latest or wait". The refnum given is locked and guaranteed to stay uncorrupted from the producer loop. If new data has been produced between two consumer calls, the call doesn't wait for new data, and returns the latest one. If not, it waits for the next data.
At each producer iteration, producer starts with a "reserve data", which returns the refnum in which to fill. Once data is ready, it calls "reserved data is ready". These two calls never wait, so producer is always running at a fastest pace.
Implementation details
A condition variable is shared between producer and consumer. This variable is a cluster holding indexes "locked", "grabbing", and "ready". The condition variable has a mechanism that allows to acquire mutex access to the cluster, and atomically release it and wait. When the variable is signaled by the producer, the mutex is re-acquired by the consumer. This guarantees that the consumer that the variable isn't accessed by producer between end of consumer wait and lock by consumer.
Reference for CV implementation: "Implementing Condition Variables with Semaphores ", Andrew D. Birrell, Microsoft Research
210 downloads
Updated
-
SET Localization Toolkit
By Porter
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.
Features:
- 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.
Requirements:
- Unicode support enabled in the LabVIEW.ini file
Installation:
- Download the ".vip" file and install using VI Package Manager 2014
- Make sure that "UseUnicode=True" is set in the "labview.ini" file
Usage:
- From within any LabVIEW window, select "Tools->LAVA->SET Project Editor"
GitHub: https://github.com/rfporter/SET-Toolkit
1,457 downloads
Updated
-
ShapeLib
By SDietrich
This is a package containing LabVIEW bindings to the library ShapeLib for working with shapefiles.
The DLL as of version 1.3.0 is included in the package. This DLL is compiled with Microsoft Visual Studio 2010 Express, so you need the corresponding runtime. But chances are you already have it because other programs on your computer need it, too. So just give it a try.
The library is thread safe, but the objects are not. E.g. you can open two different files in different threads, but you can not operate on the same file from two different threads at the same time.
As of the moment the DLL is 32bit only.
196 downloads
Submitted
-
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)
363 downloads
- inthehand
- bluetoothwin32events
- (and 3 more)
Submitted
-
easy increment
By tylertroy
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!
144 downloads
- interface
- useability
- (and 1 more)
Submitted
-
Rubiks Cube Solver
By Neil Pate
This project is a 100% G based Rubiks Cube solver that I coded quite a while ago (2007) and then forgot about. I must have saved it it more recently in LV2011.
The algorithm is based on the 7-step method, which is totally sub-optimal for solving a cube, but relatively simple to understand.
Please note this code is not representative of my current coding ability, I just upload it in case anybody is interested.
If I get time I would like to do a 3D representation of the cube and allow the manipulations to be done in this view.
Run instructions:
set the show boolean to True click randomise! pick a start colour click solve! The buttons on the left hand side can be used to do manual manipulations of the cube.
4,985 downloads
Updated
-
LabView <-> google maps websocket interface
By Gribo
A simple bi-directional interface between Labview and Google maps, using Websocket.
See readme.txt for instructions.
3,951 downloads
Updated
-
Labview <-> Google maps VI
By Gribo
Connects to google maps javascript V3 api using the web browser .NET object (it exposes the HTML DOM model, where as the ActiveX control does not). This is an improvement over the examples from NI, as it allows dynamic adjustments to all of the map objects. Currently, only circle and marker are implemented.
2,210 downloads
Updated
-
moderator1983
By Breakpoint
MSDN Link: GetDriveType function
109 downloads
- get drive type
- drive info
- (and 1 more)
Submitted
-
LU Solver
By bsvingen
A native Labview (wire) general real matrix solver.
Based on BLAS (FORTRAN code included)
149 downloads
Submitted
-
Wire And Connect Quick Drop Plugin
By bbean
This Quick Drop (QD) plugin complements the functionality of the built-in QD plugin (CTL-Space-CTL-D) by wiring between selected controls, indicators, constants, and SubVIs.
Default Shortcut - [W] Normal Operation Wires selected nodes in left to right order. Attempts to connect any common unwired terminals in between the far left and right nodes by checking the datatype, Name, or Caption. Holding Shift and the Shortuct: Wires controls to unwired far left Node terminals and indicators to unwired far right node terminals. This is just something I put together as my first attempt at a Quick Drop plugin. Something similar has been done previously to wire the corners of subVIs using the right click framework by user JCC_(SK): RCF Plugin - Wire Nodes by Corner - https://decibel.ni.com/content/docs/DOC-8386 . Code for this plugin was developed prior to knowledge of the JCC_(SK) RCF code and probably doesn't function as well since it hasn't been tested thoroughly. However this plugin is for quick drop and has some added capability to wire up all like terminals but can suffer from potential overzealous wiring. Just delete extra wires if necessary. Thanks to the NI guys for creating the QD template with good instructions. Someone may have done this already but I'm putting this out for comment anyway. <a href="http://www.screencast.com/t/PZhMafM2">WireAndConnectVideo</a> http://www.screencast.com/t/PZhMafM2
186 downloads
Submitted
-
Data Broadcasting Library for Actor Framework
By Stobber
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.
2,814 downloads
- lvoop
- actor framework
- (and 1 more)
Updated
-
Toolbar XControl
By gb119
lavag_lib_User_Interface_XControls_Toolbar XControl v1.0.0.3 by University of Leeds
Author: Gavin Burnell
Copyright: Copyright © 2013, University of Leeds
License: BSD
Compatible LabVIEW Versions: >= 2012.
Compatible OS Versions: ALL.
Description:
This is a native toolbar for LabVIEW implemented as an XControl. It supports a single row of square buttons which maybe latching (sticky) or transitory (command) style buttons drawn in one of 4 different styles (system, square, flat or rounded). The toolbar will report button clicks via a value change event, but allows the possibility for further integration into other messaging systems.
The buttons are represented as instances of a button base class that provides methods for drawing the button, updating tooltip text or responding to clicks. Overriding these methods in subclasses allows a greate flexibility of response. Included in the package is a 'vi-button' class that stores a vi reference with each button and executes it when clicked.
This Package depends on these other packages:
oglib_string >= 4.1.0.12
1,043 downloads
- user interface
- xcontrol
- (and 1 more)
Updated
-
filter specific range of color
By PBJ
This function filters blue pixels.
I have used HSL.
328 downloads
Updated
-
Move_Cursor_with_Scroll_Key
Copyright © 2012, Prabhakant Patil
All rights reserved.
Author: Prabhakant Patil
Contact Info: Contact via PM on lavag.org
LabVIEW Versions: 2012
Dependencies:
1. LabVIEW Runtime engine 2012
Description:
This example will help you to scroll graph cursor with scroll keys ( UP, Down. Left, Right)
Support:
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 "Move_Cursor_with_Scroll_Key_LV2012" support page.
Prabhakant
293 downloads
Submitted
-
A microsecond accurate timer for Labview in Windows
By jcnossen
Since the standard Tick Count VI has very limited resolution, I made a simple timer using the QueryPerfomanceCounter methods in the windows kernel32.dll. The output is the time in seconds as a double precision value.
1,149 downloads
Submitted
-
Waveform Class
By cvis
LabVIEW Versions:
2010 SP1
Dependencies:
None
Description:
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.
449 downloads
Updated
-
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-1.0.0.6.vip' 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.
Error
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!
Timing
Calculate elapsed and remaining time, and abort a running Wait function for instance.
VIRegister
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.
Cheers,
Steen
2,435 downloads
Submitted
-
Mercurial Provider
By Ton Plomp
This toolkit allows you to directly communicate with you Mercurial repository, from within the LabVIEW project environment.
This toolkit acts as an extension of the supplied LabVIEW SCC interface in LabVIEW professional.
The toolkit allows you to commit, push, tag changesets. Has support for adding Issue tracking IDs.
397 downloads
Submitted
-
Multiple File Path Control
By David_L
This Multiple File Path Control is similar to the default File Path Control in LabVIEW 2011, however you can select more than one file at a time. The data type on the block diagram is an array of File Path Control.
Right click on the MFPC to have it display the full paths or just the file names.
I'll try to post this in pre-2011 but because it uses silver controls, I'll have to make some significant changes.
599 downloads
Submitted
-
Submitted
-
HTML Report Embedded images
By Ton Plomp
This class adds a special version for the HTML-report generation VIs.
By using this class you can use the normal report generation functions, however images will be embedded in the HTML file inside the <IMG> tag.
This tool adds a special override class for the Report Generation toolkit. With this class come 3 overrides for the following functions:
Append Control Image to report
Append Image to report (path)
Append Image to report (string)
These functions allow you to embed the added image into the HTML IMG tag. With this functionality it's possible to generate HTML reports that can be shipped without depending on a file-layout or web-server.
The included DEMO VI shows you how to use this class (only the initiate function is required), and loads a sample file into your default web-browser.
582 downloads
Submitted
-
Encryption
By Ton Plomp
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:
EBC
CBC
CFB128
OFB
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)
SHA1
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.
2,436 downloads
Submitted
-
ClearCase API
By dannyt
ClearCase API v1.0.0
Copyright © 2011, Danny Thomson
All rights reserved.
Author: Danny Thomson
LAVA Name: Dannyt
Contact Info: Contact via PM on lavag.org
LabVIEW Versions:
LabVIEW 2010
Dependencies:
oglib_string v2.6-1
oglib_file v3.0.1-1
Description:
The API provides an interface to communicate with the CleaCase source control tool.
This API is not meant as a integrated ClearCase provider in LabVIEW.
Installation and instructions:
Installation is performed by VIPM, after which a palette is created in the user.lib palette.
sourcecode can be found here BitBucket
Examples:
No examples are included
Known Issues:
This package only supports Windows ClearCase clients and only supports Base ClearCase no UCM is supported at present.
Acknowledgements:
Thanks to Ton Plomp for inspiration with his Mecurail API
Version History:
v1.0.0: Initial release of the code.
License:
BSD (Most common)
Support:
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 (UnCertified) and
search for the "" support page.
Distribution:
This code was downloaded from the LAVA Code Repository found at lavag.org
Some Details of functions provided
=================================
Supports Windows only, though most of the Cleartool commands and options are the same on Unix
Assumes default instilation of ClearCase working with Dynamic Views
If ClearCase is NOT installed in default location then you can manually alter install location in ClearToolPath.vi
Two types of methods
1) VI using ClearCase Cleartool command line all named *_ct.vi
2) VI using the ClearCase Automation Library (CAL) all named *_cal.vi
No interface currently provided for UCM ClearCase operations
Add.vi
========
This VI will add an element or directory to Clearcase ie create a new ClearCase Object.
NOTES
1 The Parent Object (directory) must be a ClearCase Object
2 The Parent object will automatcially be checkedout if it is not already checkedout
3 By default both the parent dir and the added object will be left checkedout
4 If adding a file, the file must already exist
5 If adding a directory , the directory must NOT exist, remember to set Directoy? to true
A creation comment can be added Comment.
Copyright 2011 - Danny Thomson
No waranty included
BranchInfo.vi
=============
This Vi checks if the Branch Name passed in exists in the VOB specified by a Valid VOB Object and if it does it will return the following information.
branch exist? true / false
locked state? True (locked) False (unlocked)
branch description Branch creation comment
obsloete? True (locked & obsolete) false (just locked)
Note only the supplied VOB is checked branch could exist in other VOBs
uses Cleartool command describe -type brtype with formating options
Copyright 2011 - Danny Thomson
No waranty included
CheckIn.vi
====================
This VI will attempt to checkoutin a ClearCase Object (file or folder).
uses ClearTool --- uncheck/out | unco [ –kee/p | –rm ] { –cact [ pname ... ] | pname ... }
–kee/p
Preserves the contents of the checked-out version under a file-name of the form element-name.keep (or, to prevent name collisions, element-name.keep.1, element-name.keep.2, and so on).
–rm
Does not preserve the contents of the checked-out version. Thus, any edits that had been made to the checked-out version are lost.
NOTE. Error -2904 if files in not checked out
Copyright 2011 - Danny Thomson
No waranty included
CheckOut.vi
=================
This VI will attempt to checkout a ClearCase object (FIle or Folder).
INPUTS
----------
FileName & Path itme to be checked out can be file or floder
Checkout comment A checkout comment
checkout Type see below
CC Branch A optional branch to checkout on e.g \main \main\dev\ats\111 see below
uses ClearTool
checkout | co [ –res/erved ] [–unr/eserved [ –nma/ ster ] ]
[ –out dest-pname | –nda/ ta ] [ –pti/me ]
[ –bra/nch branch-pname | –ver/sion ] [ –nwa/rn ]
[ –c/omment comment | –cfi/le comment-file-pname | –cq/uery | –cqe/ach
| –nc/omment ][ –q/uery | –nq/uery |–use/hijack ] pname ...
–res/erved
Reserves the branch: no user in another view can perform a reserved checkout of the same branch (but any number of unreserved checkouts can be performed); no new versions can be created on the branch until your checkout is changed to unreserved with unreserve or resolved with checkin or uncheckout. If you specify both –reserved and –unreserved, this command performs a reserved checkout if possible; otherwise, an unreserved checkout.
–unr/eserved [ –nma/ster ]
Leaves the branch unreserved; other users, in other views, can check out the same version (but at most one of the checkouts can be reserved).
CC BRANCH
Default - blank. View Config specifications rules will be applied.
This allows a specific branch to be used to be used to checkout the file. NOTE branch must in this case MUST be the full branch path ie \main\dev-ats-456 not the branch type dev-ats-456. If CC Branch is used the CC warning messages are suppresed as they WILL occurs, but do not indicated we have have a problem, the branch used MUST EXISTS for the objects being checked out
Copyright 2011 - Danny Thomson
No waranty included
CreateBranchType.vi
===================
This VI will create a new ClearCase Branch Type
Uses CAL
Copyright 2011 - Danny Thomson
No waranty included
CreateLabelType.vi
===================
This VI will create a new ClearCase Label Type
NOTE Label Type Names cannot have spaces in them, else they will be invalid
Uses CAL
Copyright 2011 - Danny Thomson
No waranty included
FileInfo.vi
=================
This Vi finds information on the ClearCase element & version matching the input File or Folder
Outputs
----------
View Private File True if item is not a ClearCase Object other outputs are only valid IF this is FALSE
Labels List of Labels applied to this element. Label (0) is latest label
Flags
IsCheckedOut -- True / False
IsLatest -- True / False
General Info
Branch -- associated branch for file
Extended Pathname -- full ClearCase exteneded pathname ie test.vi@@/main/dev-ats-345
identificer -- see above the bit after ther @@
comment -- if checked in checkin comment else shows checkout comment
using CAL
Copyright 2011 - Danny Thomson
No waranty included
FilesOnBranch.vi
=====================
This Vi lists files on the clearcase branch Branch Name provided.
This VI needs a path to a Valid VOB Object to work.
Default is for Output paths to be Absolute Pathnames using the Windows Mapped Drive. This can be change using the Return Path Type input
Output Cluster
- Total Files on branch
- LabVIEW files on branch ie llb, vi, vit, ctl
- Directories on branch
- Other files On branch
uses ClearTool
find pname -all -nxname -visible -version "brtype(%s)" -print
NOTE. This VI does NOT check the branch exists, such a check should be run first CtViewExists.vi
Copyright 2011 - Danny Thomson
No waranty included
GetConfigSpec.vi
=====================
Gets the ClearCase View Configuration Spec for the View specified ViewTag
Uses ClearTool -- catcs -tag
Copyright 2011 - Danny Thomson
No waranty included
GetViewTagAndCSpec
=====================
This Vi will get the ClearCase ViewTag & releated View Configuration Spec
valid for the provide file or folder
Uses ClearCase Automation Libray
Copyright 2011 - Danny Thomson
No waranty included
LabelFiles.vi
==============
This VI will attach a already created Label Type to the version of the current directory selected by your view,
and to the currently selected version of each element in and below the current directory.
Uses CAL
Copyright 2011 - Danny Thomson
No waranty included
ListBranchTypes.vi
===================
This VI will provide a list of all the Branch Types in a VOB
This VI can take a long time if there are many branches in the VOB !!!!!
using CAL
Copyright 2011 - Danny Thomson
No waranty included
ListCheckOuts.vi
=======================
This Vi finds Checkedout files in the VOB selected by the
File Or folder in VOB input
Output
----------
2-D arrray listing checkedout files
Columns are PathName - View checkedout in --- branch checkedout on -- user checkedout to
using CAL
Copyright 2011 - Danny Thomson
No waranty included
ListLabelTypes.vi
=================
This VI will provide a list of all the Label Types in a VOB
This VI can take a long time if there are many Labelss in the VOB !!!!!
using CAL
Copyright 2011 - Danny Thomson
No waranty included
ListPrivateFiles.vi
========================
This Vi lists the view private files in the VOB and View specified
Inputs
-------
Valid VOB Object Specify VOB
ViewTag Specify ViewTag
Include Checkouts ?(F) If True Checkedout files will be included in results else they will be ignored
Default is for Output paths to be Absolute Pathnames using the Windows Mapped Drive. This can be change using the Return Path Type input
Output Cluster
- Total Files on branch
- LabVIEW files on branch ie llb, vi, vit, ctl
- Directories on branch
- Other files On branch
uses ClearTool
cleartool lsp·rivate [ –tag view-tag ] [ –inv·ob vob-selector ] [ –l·ong | –s·hort ]
[ –siz·e ] [ –age ] [ –co ] [ –do ] [ –oth·er ]
NOTE. This VI does NOT check the branch exists, such a check should be run first CtViewExists.vi
Copyright 2011 - Danny Thomson
No waranty included
SetConfigSpec.vi
====================
Set the ClearCase View Configuration Spec for the View specified ViewTag
Input
-------
Filename Text File that supplieds the view config spec
Uses ClearTool -- setcs -force filename.txt
No waranty included
UndoCheckOut.vi
--------------------
This VI will attempt to undo a checkout on ClearCase File.
uses ClearTool --- uncheck/out | unco [ –kee/p | –rm ] { –cact [ pname ... ] | pname ... }
–kee/p
Preserves the contents of the checked-out version under a file-name of the form element-name.keep (or, to prevent name collisions, element-name.keep.1, element-name.keep.2, and so on).
–rm
Does not preserve the contents of the checked-out version. Thus, any edits that had been made to the checked-out version are lost.
NOTE. Error -2904 if files in not checked out
No waranty included
ViewExists.vi
-----------------
This Vi checks that the VIEW specified by the supplied View Tag exists
Using ClearTool --- lsview
No waranty included
910 downloads
Updated