Workspace 6.21.5
|
The CountedLoop operation is the most fundamental (and most powerful) looping operation in Workspace. The operation has a Start value and an End value, and will repeatedly execute the "loop" of downstream operations that are connected to its Iteration dependency input. This set of downstream operations is often referred to as the "Loop body". NOTE: The operation will not execute unless at least one downstream operation is connected to its Iteration dependency input, and at least one operation is connected to its Counter value output. See also: Understanding Counted Loop
Inputs: | |||
---|---|---|---|
Enable loop | bool | If true, the loop will execute multiple iterations, based on its control inputs. If false, the loop will execute a single iteration only. | |
Wrap | bool | If true, once the loop has completed its final iteration and satisfies its termination condition, it will restart executing from the first iteration again. This can be useful for UI-driven applications where continuous (but repeating) feedback loops are required. | |
Enable parallel looping | bool | If enabled, the loop will attempt to execute iterations in parallel, making use of multiple cores on the local machine, as well as any remote execution resources specified in the parallel / remote execution configuration in the Workspace settings. For more information about remote / parallel execution in Workspace, please see the parallel / remote tutorials available under the "help" menu. | |
Iteration dependency | CSIRO::DataExecution::Dependency | Special dependency input that marks the end of the loop body. The dependency output of the last operation in the loop body must be connected to this input. | |
Start value | int | The starting value of the loop. | |
End value | int | (inclusive) The value of the Counter value that will be output on the last iteration of the loop. The loop will execute (End value - Start value + 1) / Step value times. | |
Step value | int | The increment to add to Counter value after each iteration. | |
Counter value | Modified-in-place | int | The value of the Counter value that will be output on the first iteration of the loop. |
Outputs: | |||
Counter value | int | The number of the current iteration of the loop. |