Programming Reference / Program / Function


Suppose you have the same group of blocks you would like to execute in multiple places within your Main Loop. A Function allows you to group these reused blocks in a separate execution boundary, and then use a single Call Function block from the Main Loop to go execute the blocks in the Function and then return execution to the Main Loop.

Create a Function

This was shown previously in the topic Using the Programming IDE/Resources/Functions.

Using the Function

Place the Function instruction into your Workspace, click the data entry box and select your function. In this example we previously created the Function name “MyFunction”





Item Name Description
A Function Selection for User created Function
B Function Block Boundary Blocks placed in this area are executed top to bottom and the program execution returns to the Main Loop or different Function from which this function was called using its Call Function instruction