Archive for the ‘example’ Category

By using Active X or the NI LabVIEW Report Generation Toolkit you can match your timestamps in LabVIEW with your timestamps in Excel.

 

20922_310_426_cache.png

 

>> Start converting now.



To mimic program logic control codes in LabVIEW, you can use multiple while loops so the function can update in real time and update based on logic in that moment.  This code can be tailored for any use you may need.



 

 

22184_620_432_cache.png

 

>>  Download the code here.

Here’s a file path to filter out unnecessary data, allowing you to automatically update the file path so your VI will only save data that meets your special criteria.

 

 

image_jpeg.jpg

 

 

 

 

>> Get the file path filter here.

 



Finally, a code for when you’re feeling rhythmically challenged—a LabVIEW metronome.

 

 

22251_310_204_cache.png

 

 

 

>>  Get the code here.

 

 



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.

 

image_png.png

 

>> Grab the code here.



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

 

22499_620_310_cache.png

 

>> Want to see how? Check it out!



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.

 

snippet.jpg

 

>>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.

 

Serial+Port+Test+1.2.jpg

 

>> Download the code here.

If you find yourself wondering where the sun is positioned at 30.17’ N and 97.44’ W today (Austin, Texas), there is code to ease your curiosity. When you input the latitude and longitude of a specific location, a returned URL will give you the exact sun position and shadowing for that day. If you weren’t curious before, you probably are now.

 

SunData.jpg

 

>> Get the code to start your sun searching here.