A While loop executes a statement or statements in a loop as long as a given condition is true.
WHILE Expression DO
The following code fragment uses a WHILE loop:
WHILE DevNext(hDev) DO
Counter = Counter + 1;
/* Count the number of records in the device (hDev)*/
Be careful when using WHILE loops in your Cicode
functions: WHILE loops can cause excessive loading of the CPU and
therefore reduce system performance. If you use a WHILE loop to
loop forever, you should call the Cicode function
Sleep() so that CitectSCADA can schedule other tasks.
Sleep() function increases the
performance of your CitectSCADA system if you use many
Working with Conditional Executors