Lab .1(b) 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.

Instructions
  1. 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.
  2. 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.
  3.  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.
  4. 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.
  5. 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.

No comments:

Post a Comment