<< Chapter < Page Chapter >> Page >

  • Use structures on the block diagram to repeat blocks of codeand to execute code conditionally or in a specific order.
  • The While Loop executes the subdiagram until the conditional terminal receives a specific Boolean value. By default, the While Loop executes its subdiagram until the conditional terminal receives a True value.
  • The For Loop executes a subdiagram a set number of times.
  • You create loops by using the cursor to drag a selectionrectangle around the section of the block diagram you want to repeat or by dragging and dropping block diagram objectsinside the loop.
  • The Wait Until Next ms Multiple function makes sure that each iteration occurs at certain intervals. Usethis function to add timing to loops.
  • The Wait (ms) function waits a set amount of time.
  • Coercion dots appear where LabVIEW coerces a numeric representation of one terminal to match the numericrepresentation of another terminal.
  • Use shift registers on For Loops and While Loops to transfer values from one loop iteration to the next.
  • Create a shift register by right-clicking the left or right border of a loop and selecting Add Shift Register from the shortcut menu.
  • To configure a shift register to carry over values to the next iteration, right-click the left terminaland select Add Element from the shortcut menu.
  • The Feedback Node stores data when the loop completes an iteration, sends that value to the nextiteration of the loop, and transfers any data type.
  • Use the Feedback Node to avoid unnecessarily long wires.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




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?

Ask