Workspace 6.21.5
CountedLoop

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

  • Default label: "Counted loop"
  • Member of plug-in: Built-in
  • Catalogue path: Builtin/Loops
Inputs:
Enable loopboolIf true, the loop will execute multiple iterations, based on its control inputs. If false, the loop will execute a single iteration only.
WrapboolIf 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 loopingboolIf 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 dependencyCSIRO::DataExecution::DependencySpecial 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 valueintThe starting value of the loop.
End valueint(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 valueintThe increment to add to Counter value after each iteration.
Counter valueModified-in-placeint

The value of the Counter value that will be output on the first iteration of the loop.

Outputs:
Counter valueint

The number of the current iteration of the loop.