Loop and Loop End
Description
The Loop () and Loop End () tasks are used together to repeat a set of tasks that are within the two tasks.
 
Task is available for...
Task is available in...
Any device
Startup Protocol
Main Protocol
Cleanup Protocol
Task parameters 
Note: Loop End does not have any task parameters.
After adding the Loop task at the desired point in the protocol, set the following parameters in the Task Parameters area:
 
 
Parameter
Description
Number of times to loop
The number of times you want to run the tasks within the loop.
Change tips every N times, N=
The number of times to run the tasks in the loop before changing the tips.
For example, if N is set to 2, the Tips On task will be run every odd number of the loop: first, third, fifth, and so on. The Tips Off and Change Instance tasks that operate on the tip box used by the Tips On task will run every even number of the loop: second, fourth, sixth, and so on.
Note: If the loop does not contain any tasks that require pipette tips, the software ignores this parameter.
If you want to change the value of variables during the looping process, click Custom Parameters and set the following:
 
 
Parameter
Description
Add Variable
The command that adds a variable in the Variable table.
To add a variable, click Add Variable. A blank row appears in the table. Select the desired value for each column.
Delete Variable
The command that deletes the selected variable from the table.
Variable table
The table that lists the variables to be incremented or decremented in the loop.
Variable name
The variable you want to increment or decrement.
Select the variable from the list. The variables are defined in the Define Variables task, the Define Plate Set task, or the JavaScript code in the Advanced Settings area.
If the variable is new and was not previously defined elsewhere, and an initial value is given, the variable will be defined the moment the Loop task runs.
Initial value
The starting value to be used the first time through the loop.
For variables, the Initial value is the starting value of the variable. For plate sets, the Initial value is the starting array index value.
Note: The starting variable value specified in this task overrides the starting variable value the operator provides during run time.
Increment
The amount you want the variable to increment or decrement.
Frequency
The frequency of the increment or decrement:
Every time. The variable should increment or decrement every loop.
Every n times. The variable should increment or decrement every specified number of times.
After first time. The variable should increment or decrement starting from the second loop.
After last time. The variable should increment or decrement after the last loop.
n
The number of times to loop before a variable increments or decrements.
This field is available only if you selected Every n times.
Example: Use the Loop task for plate set indexing 
Goal
In a protocol where a plate set variable is defined, use the Loop task to specify the starting plate set (or array) index, how frequently the variable will increment or decrement, and the amount by which the index will increment or decrement.
Implementation
In the following protocol example, a plate set is defined and used in the liquid-handling tasks.
I
In the Define Plate Set Task Parameters area, an array of source microplates is defined and indexed (0, 1, 2, and 3). In the Loop Custom Parameters area, the PlateSet variable is selected. The Initial Value is set to 0 to match the first PlateSet index (0). The PlateSet variable will increment by 1 every time through the loop. So the first time through the loop, PlateSet index 0, or SourceA is processed. The second time through the loop, PlateSet index 1, or Source B is processed, and so on.
I
Related information
 
For information about...
See...
Adding devices
Device user guide
Adding tasks in a protocol
Define Plate Set task
Task parameter variables
Liquid-handling tasks
Microplate-handling tasks
Microplate-storage tasks