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.
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
By CopperDSimple 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
Clustering to clean up code more
Load project in LabVIEW 2015 32/64 bit
Start program using Mandelbrot Main.vi
Test stand had a touch screen. User wanted radio buttons instead of a pull-down menu. Wanted tests to run on pressing the button and pass/fail indication thereof. So I did that for him. Here is the stand-alone proof-of-concept that I worked up for it. Arrays are used so Boolean texts can change to suit different models of unit under test. If a Boolean text is blank, then that button will go invisible meanwhile, there being as many (up to 7) or as few (down to one) as may need be.
I should mention, in case it's not obvious, that when in actual use, the three arrays are hidden inside of a sub-VI and not (as shown here) visible to users as part of the front panel.
By SDietrichThis 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.
By BenoitThis VI allow an easy way to create HTML color table in the LabVIEW report generation toolkit. This VI should be connected to the "Append User Formatted HTML to Report.vi".
For this version, all the column are the same size. But alignment and color of each cell can be defined.
Please rate this file if you download it. It's free... you can at least give some second of your time to rate it... I spend some hours to make it...
By bbeanThis 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
By o u a d j ia "Select" ... but with N inputs
2 menus :
a - select mode : after&before , only after, only before
b - select output : top , center
a - add input (after)
b - remove input
(for a quick test ... unzip ---> QUICK_TEST.vi)
By BenoitThere it is.
The complete library for the MCP2221A. I2c adapter, I/O in a single IC. I love that one.
Let me know if any bug is found.
I try to make that library as much convenient as possible to use. Two version available 32 bit and 64 bit. little note: to open by serial number, the enumeration need to be activated on the device first. (open by index, enable the enumeration) It needs to be done only once in the life time of the device.
PLEASE do not take ownership of this work since it is not yours. You have it for free, but the credit is still mine... I spent many hours of my life to make it works.
By ComradeThis 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
By bsvingenA native Labview (wire) general real matrix solver.
Based on BLAS (FORTRAN code included)
By tylertroyI 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!
By BenoitThis XML test report library is available for you to modify at your will.
It is based on the IPC-2547 standard so it is easier for any other application or database to parse.
The html file report offered by LabVIEW was not sufficient for my need.
So I created those. enjoy!!!
By CopperDAllows new functions to be compiled during runtime by using libtcc. http://bellard.org/tcc/
Features Full ANSI C compiler ISO C99 extensions (Missing only complex and imaginary numbers) GNU C extensions (See TCC Docs) TinyCC extensions (See TCC Docs) GNU-like inline assembler 32bit & 64bit opcodes depending on DLL (See TCC Docs) Compile to memory to call as function or disk as exe Allows for dynamic code Pointer safe checks
Adding 2 numbers and using return to get the result
Using system to call cmd
Inline x86 assembly
Passing in information using argc and argv
Using pointers to pass a string in and an SHA512 hash out
Uses libtcc unmodified, so for security reasons you can download the dll from the author's website or compile your own from source. The dll is included if you wish to use it.
Some very basic examples that show off only a tiny subset of the features this compiler offers. Unless you are very careful, compiling functions during runtime can lead to unstable code. (Test before you deploy) All examples should run without issue but modification can and will lead to crashing. (Save often)
We have recently developed a toolkit that allows you to use Quick Drop plugins in Right Click Framework or LabVIEW Speak platforms.
Named RCF LVS Conversion Toolkit, this toolkit provides an easy solution for JKI Right Click Framework (RCF) and LabVIEW Speak (LVS) lovers who want to use a quick drop plugin in RCF or LVS. Now, you wont be disappointed when you see a useful plugin not written in your favorite platform's plugin format.
Procedures are simple:
Open the toolkit by going to Tools Menu >> Synovus >> RCF LVS Conversion Toolkit...
Select the target Quick Drop plugin VI
Type the command name in Right Click Framework or LabVIEW Speak
Now you can use the Quick Drop plugin in Right Click Framework or LabVIEW Speak platform
Automatically converts a QD plugin to RCF or LVS plugin format
Warns the user if repetitive commands are installed.
Provides an instruction as user clicks help button.
Helps the user navigate to the plugin folders (LVS, QD and RCF)
Modifying the functionality in Quick Drop VI will automatically update the functionality in Right Click Framework or LabVIEW Speak
Please let me know if you have any questions. Suggestions and comments are welcome
Note: RCF and LVS only update their lists of commands at startup. If you use the RCF LVS Conversion Toolkit when RCF and LVS are open, please restart these platforms.
By ComradeThe 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.
By hooovahhThis application is designed to help manage a system, that has multiple versions of LabVIEW installed. It does this by adding an icon in the system tray for launching any version of LabVIEW installed. This may work with 64-bit versions of LabVIEW but it has never been fully tested. It has several other features which are useful when having multiple versions of LabVIEW installed.
Launch any version of LabVIEW installed from the system tray icon. Kill or restart any version of LabVIEW running from the system tray icon. Abort all VIs running in all versions of LabVIEW from the system tray icon. (not asynchronous clones at the moment) Abort all private context VIs from the settings dialog found by double clicking the system tray icon. (not asynchronous clones at the moment) Control what version of LabVIEW is used on opening a VI or LabVIEW file. (File Extension support in the configuration dialog) Configuration can chance the behavior of this but by default it will ask what version of LabVIEW to open a VI in if more than one version can open it. By default a VI set to Run On Open will always ask what version, and if you would like to run it on open or just open it. Shift can be held when opening a VI to always be asked what version to use. CTRL can be used to select the default option which is generally the last version used. By default if only one version of LabVIEW is running, and it can open the VI, then it will be opened in that version. Other file extensions can be selected after the install. Read the Readme Usage for more information on how this works. For this software to function properly, at least one LabVIEW Run-time, or development needs to be installed which is version 2011 or newer. The source includes all versions from 2011 to 2017. The installer includes the builds from all versions 2011 through 2017. An AutoIt script and source are included which selects the right EXE based on what version of the run-time engine are installed. This is why multiple versions are included in the installer.
Also for VI Server functions to work properly each version of LabVIEW needs to be configured to have TCP/IP configured and a unique port. This is all done automatically through VIPM so my suggestion is to configure all versions of LabVIEW through VIPM, at which point this tool should work. Some features of this will work without this enabled but not all of them.
This is the LabVIEW Tray Launcher, originally discussed and developed in 2009 here.
A fully built installer for version 1.5.0 can be found here. Just download the installer and run it. It should add all the needed files to the Program Files directory, and edit the registry if you allow it during the install.
By BenoitThis is the only way I found how to have a bunch of color that are unique and easily distinguishable. The maximum I saw in the web was about 26. This one offer 55 of them without gray tone. You can modify this VI to support gray tone as well and goes up to 60 colors.
Please use the new version at: New version
By BreakpointMSDN Link: GetDriveType function
By bodopoqWhen using ChirpZ transform of LabVIEW(The example itself provides),I found a strange thing.When the frequency is very big and the range is small together with a not small number of ChirpZ transform,Error happened(very bad spectrum and wrong frequency ChirpZ's result is)! Nothing is wrong with the examples(I've scripted other VIs to verify this),and this error didn't happend using MATLAB. So I believe that is a bug of LabVIEW!!!(Not Sure yet of course). I Need Help! Talent Masters, Come out!
By hooovahhThis toolkit combines a variety of TDMS functions and tools into a single package. The initial release has a variety of features:
- Classes for Circular, Periodic, Size, and Time of Day TDMS generation with examples of using each
- Reading and Writing Clusters into TDMS Channels
- XLSX Conversion example
- File operations for combining files, renaming, moving, and saving in memory to zip
- Basic function for splitting TDMS file into segments (useful for corrupt files)
- Reorder TDMS Channel with Demo
There is plenty of room for improvements but I wanted to get this out there and gauge interests. The variety of classes for doing things, along with VIMs, and class adaptation makes for using them easier. If I get time I plan on making some blog posts explaining some of the benefits of TDMS, along with best practices.