Loop

The Visual Logic Command Loop allows users to repeat a section of Logic for a certain number of times. Loops require a Global Data Item to be used to count to the number of times the loop is performed. To create a Global Data Item navigate to the Information Store - and select new, make sure that the Global Data Item is number-based.

Simul8 Loop Images

To add a Loop navigate to the Visual Logic Section where it is to be implemented then add the parameters below. Note, If “From” and “To” are the same only one pass will be made through the loop lines. If “From” is greater than “To” the lines in the loop will not be obeyed even once.

Parameters

  • From: Starting value of the Global Data Item
  • Global Data Name: Name of Global Data Item used to count the loop
  • To: Ending value of Global Data Item

Annotated Loop

In the example above the command is utelised to add 5 Work Items to Queue 1.