How to Measure Time on LabView


LabView is a software development platform that allows users to develop programs using a graphical language. LabView software applications are generally used for instrument control, machine automation and data acquisition. Many of these tasks require actions to be performed by the software at regular time intervals. For example, a data acquisition software may have to collect and save data points every two seconds. In such cases, the programmer has to write code to measure time using function blocks available in LabView.

  • Launch the LabView software by double-clicking on the LabView shortcut icon on your computer desktop. Create a new LabView program by clicking on "New VI" on the LabView splash screen, and save it as "measureTime.VI." Every LabView program has two windows: the front panel window and the diagram window.

  • Open the "Functions" palette by clicking on "View" followed by "Functions palette" in the "Menu" bar of the diagram window. Drag and drop a "Time Elapsed" component from the "Functions" palette into the diagram window.

  • Drag and drop a "While Loop" from the "Functions" palette around the "Time Elapsed" component. A stop button is automatically created for the while loop and is displayed on the front panel window. The "Time Elapsed" component has two outputs: the "Elapsed Time (s)" output and the "Present Time (s)" output.

  • Right-click on the "Elapsed Time (s)" output and click on "Create Indicator." A numeric indicator for the elapsed time will be automatically displayed on the front panel window. Similarly, right-click on the "Present Time (s)" output. Click on "Create Indicator" to create a numeric indicator for displaying the present time on the front panel window.

  • Run the LabView program by clicking on the "Run" button on the "Menu" bar of the front panel window. The "Elapsed Time" component will measure the time since the program started execution and display on the "Elapsed Time" numeric display on the front panel. The "Present Time" numeric display will show the current time.

Related Searches


Promoted By Zergnet


Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!