Home > Support > NI Product Manuals > LabVIEW Communications System Design Suite 1.0 Manual

Repeating Operations

In programming, there are times when you want to repeat code a set number of times or until a specified condition is met. You might have a section of code that you know you want to run three times or a program you want to keep running until a user clicks a stop button. You can use loops to do this.

A loop is a programming element that executes the same code multiple times.

Types of Loops

You can use the following loops to repeat code in G Dataflow: a While Loop and a For Loop.

Loop Behavior Example Diagram
While Loop Repeats the code inside the loop until a specified condition is met. Continue rolling a die until the value of the die is 6.
For Loop Repeats the code inside the loop for a set number of iterations. Generate five random numbers between 1 and 10.