<< Chapter < Page Chapter >> Page >
Practice debugging techniques.

Complete the following steps to load a broken VI and correct the error. Use single-stepping and execution highlighting to stepthrough the VI.

Front panel

  • Select File>>Open and navigate to C:\Exercises\LabVIEW Basics I to open the Debug Exercise (Main) VI.The front panel shown in appears.
    Notice the Run button on the toolbar appears broken, shown in , indicating that the VI is broken and cannot run.

Block diagram

  • Select Window>>Show Block Diagram to display the block diagram shown in .
    The Random Number (0-1) function, located on the Functions>>Arithmetic&Comparison>>Express Numeric palette, produces a random number between 0 and 1 .The Multiply function, located on the Functions>>Arithmetic&Comparison>>Express Numeric palette, multiplies the random number by 10.0 .The numeric constant , located on the Functions>>Arithmetic&Comparison>>Express Numeric palette, is the number to multiply by the random number.The Debug Exercise (Sub) VI, located in the C:\Exercises\ LabVIEW Basics I directory, adds 100.0 and calculates the square root of the value.
  • Find and fix each error.
    • Click the broken Run button to display the Error list window, which lists all the errors.
    • Select an error description in the Error list window. The Details section describes the error and in some cases recommends how tocorrect the error.
    • Click the Help button to display a topic in the LabVIEW Help that describes the error in detail and includes step-by-step instructions forcorrecting the error.
    • Click the Show Error button or double-click the error description to highlight the area on the blockdiagram that contains the error.
    • Use the Error list window to fix each error.
  • Select File>>Save to save the VI.
  • Display the front panel by clicking it or by selecting Window>>Show Front Panel .

Run the vi

  • Click the Run button to run the VI several times.
  • Select Window>>Show Block Diagram to display the block diagram.
  • Animate the flow of data through the block diagram.
    • Click the Highlight Execution button, shown in , on the toolbar to enable execution highlighting.
    • Click the Step Into button, shown in , to start single-stepping. Execution highlighting shows the movement of data on the blockdiagram from one node to another using bubbles that move along the wires. Nodes blink to indicate they are readyto execute.
    • Click the Step Over button, shown in , after each node to step through the entire block diagram. Each time you click the Step Over button, the current node executes and pauses at the next node.Data appear on the front panel as you step through the VI. The VI generates a random number and multiplies itby 10.0 . The subVI adds 100.0 and takes the square root of the result.
    • When a blinking border surrounds the entire block diagram, click the Step Out button, shown in , to stop single-stepping through the Debug Exercise (Main) VI.
  • Single-step through the VI and its subVI.
    • Click the Step Into button to start single-stepping.
    • When the Debug Exercise (Sub) VI blinks, click the Step Into button. Notice the run button on the subVI.
    • Display the Debug Exercise (Main) VI block diagram by clicking it. A green glyph, shown in , appears on the subVI icon on the Debug Exercise (Main) VI block diagram, indicating that the subVI is running.
    • Display the Debug Exercise (Sub) VI block diagram by clicking it.
    • Click the Step Out button twice to finish single-stepping through the subVI block diagram. The Debug Exercise (Main) VI block diagram is active.
    • Click the Step Out button to stop single-stepping.
  • Use a probe to check intermediate values on a wire as a VI runs.
    • Use the Probe tool, shown , to click any wire. A window similar to appears.
      LabVIEW numbers the Probe window automatically and displays the same number in a glyph onthe wire you clicked.
    • Single-step through the VI again. The Probe window displays data passed along the wire.
  • Place breakpoints on the block diagram to pause execution at that location.
    • Use the Breakpoint tool, shown in , to click nodes or wires. Place a breakpoint on the block diagram to pause execution afterall nodes on the block diagram execute.
    • Click the Run button to run the VI. When you reach a breakpoint during execution, the VI pausesand the Pause button on the toolbar appears red.
    • Click the Continue button, shown , to continue running to the next breakpoint or until the VI finishes running.
    • Use the Breakpoint tool to click the breakpoints you set and remove them.
  • Click the Highlight Execution button to disable execution highlighting.
  • Select File>>Close to close the VI and all open windows.

Questions & Answers

where we get a research paper on Nano chemistry....?
Maira Reply
nanopartical of organic/inorganic / physical chemistry , pdf / thesis / review
what are the products of Nano chemistry?
Maira Reply
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Preparation and Applications of Nanomaterial for Drug Delivery
Hafiz Reply
Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
Jyoti Reply
ya I also want to know the raman spectra
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
yes that's correct
I think
Nasa has use it in the 60's, copper as water purification in the moon travel.
nanocopper obvius
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
scanning tunneling microscope
how nano science is used for hydrophobicity
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
what is differents between GO and RGO?
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
analytical skills graphene is prepared to kill any type viruses .
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
The nanotechnology is as new science, to scale nanometric
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
what school?
biomolecules are e building blocks of every organics and inorganic materials.
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play

Source:  OpenStax, Labview graphical programming. OpenStax CNX. Apr 09, 2015 Download for free at https://legacy.cnx.org/content/col11408/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Labview graphical programming' conversation and receive update notifications?