![](/images/new-backgrounds/1173968/173968451x1.webp)
FM-3 Programming Module Reference Manual
The example program uses the following instructions:
Do While / Loop – This program instruction is used to repeat a sequence of code as long as a test expression is true. The test expression is validated before the loop is entered. If the test expression is evaluated as False (0), then the code inside the loop will be skipped over. If the expression is evaluated as True (1), then the code inside the loop will be performed. Upon reaching the Loop instruction, the program flow returns to the Do While instruction, and the expression is evaluated again. The example program uses an expression of TRUE, which is always evaluated as True (1). Therefore the program will run continuously.
Wait For – This program instruction halts program execution until the expression becomes True. Once True, the program continues with the next line of code. The example program uses a Wait For DriveInput.1 so that the program will wait until DriveInput.1 is activated, then continue on.
Index.Initiate – This program instruction is used to initiate a single index. When using this instruction, an Index Selection Box will appear allowing you to select the index you wish to initiate. This selection box is shown in Figure 93.
Figure 93: Index Selection Box
The program is initiated using DriveInput.4 (see Figure 89).
The setup is now complete, and the example is ready to be downloaded.