Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Loops

The core building block of a trajectory is the loop. A loop defines a series of points to visit and is not restricted to scanning a single motor/device.  Loops are defined using the following three systems:

  • List – a list of values to visit (see Lists).
  • Range – a list of values to visit that is generated by a set of parameters (see Ranges).
  • Expression – a list of values to visit that is generated by a formula relying on lists, ranges, functions, and other expressions (see Expressions).

Note: List, range, and expression names represent both a node on the system and a set of calculated values. As such, the name allows for the set of values to be applied to an actual node in NICE, such as <motor device>.softPosition, but also be applied elsewhere in the trajectory, such as in an expression.

A trajectory can use multiple loops, either by generating them sequentially or within one another (see Nested Loops). Generating loops sequentially means that one loop must fully complete all its iterations before the trajectory can begin iterating over the next loop, which is called the sub-loop. The sub-loop is at the same level of indentation as the preceding loop.

VERY IMPORTANT:

The list, range, and expression names throughout a trajectory’s loops must be consistent. This includes case-sensitivity: when referencing lists, ranges, and expressions in a trajectory, you can use any case; however, the case must remain consistent throughout the given trajectory.

Created December 10, 2018, Updated June 9, 2023