Archive for the ‘code’ Category

This front panel template tool can be integrated into LabVIEW to allow you to select a VI in memory or browse to a VI on disk.  You can also use this tool to change a VI’s front panel indicator and controls.




>> Grab the code here.

This example shows how understanding LabVIEW functions can reduce your frustrations when adapting text-based code to LabVIEW.




>> Want to see how? Check it out!

Now you can use ActiveX to send an email with Microsoft Outlook.


>> Care to give it a try? Download the code.

The string limit control limits the string for the number of characters defined by the user. Download this code when designing an application for which you want to enter the value.




>> Get the code

Are you up to a LabVIEW code challenge? Want to increase your LabVIEW Coding Foot Print? Join us in the LabVIEW Coding Challenge 2011, and enter to win a Sony Cyber-shot DCS-HX9V digital camera!


There are two separate challenges for this year’s competition:

Problem Solving

For this challenge a specific coding problem will be presented and each contestant will submit a VI that solves the challenge in the manner described in the problem statement.  The submissions will be judged based on whether the answer was correct as well as execution time of the VI. The winning entry will solve the problem correctly with the shortest execution time.

User Interface

For this challenge you will be presented with a block diagram and a Front Panel with a few basic controls on it.  The challenge will be to enhance the Front Panel to make it both functional and descriptive as a User Interface.  The goal is to be creative, but also keep in mind usability in your design.  The winning entry will be chosen based on the number of “likes” (not “downloads”) it receives.

Dates & Deadlines:

Dec 1st 9:00am CT: Challenge descriptions become available
Dec 19th 9:00am CT: Submissions Accepted & voting for User Interface Challenge begins
January 11th 11:59pm CT: Deadline for submissions
January 13th 5:00pm CT: Voting ends & winners announced

To learn more about the LabVIEW Coding Challenge 2011, visit Begin submitting code today!

TDMS files can store large amounts of test and measurement data. However, when a channel contains an extremely large amount of files, your system can get overloaded. If you want to free up some space and keep your front panel from locking up, this example code can help divide these large channels into smaller segments and add them back together for a more efficient system. Your computer shouldn’t get stuck opening and closing a file 50,000 times just because you have 50,000 samples in one channel.




>>Download the code here.

Music makes the world go round. If you need to add a little music to your day, you need this code. Play .WAV files with a simple push-button right on the Arduino board. The setup allows you to define the path of the .WAV file or change it while it’s running.

There’s even a nice library of free samples if you need some help.


>> Download the code to start listening.

When connecting hardware and software, it is important to test your serial port. This small, but very necessary step can be performed simply and quickly by using this example code.




>> Download the code here.

If a new application or toolkit requires NI hardware drivers, knowing what to do isn’t always clear. You could install an existing driver, which will slow the process and be unnecessary altogether, or you could not include the driver and receive confusing errors and still be at a loss. Wouldn’t it be nice if your system could check the application for the driver upon startup? We thought so too. 


Use this example code to check the application before installation. If no driver is installed, a simple message for download will appear. If a driver is already installed, it will run the main code without you even knowing. 




>> Save yourself the trouble and download the code here.

If you are using multiple monitors, there can be difficulties when moving between systems. This example application can help you make the switch an easy transition. The application first checks your operating system for multiple monitors. Once other monitors are found, a switching button will be visible to you.  All you have to do is click on it and the application will be switched from the primary monitor to your secondary monitor and will automatically center on the screen.




>> Download the code here.