Owner's Manual (Complete)

Chapter 10—Programs and the Visual Programmer
The Home Control Assistant 49
Repeat
The Repeat element is another complex element. Here is a sample program that uses the Repeat
element:
Notice that there are two connecting lines drawn from the Repeat element. The one labeled
“Body” specifies which path to use for the elements to repeat. In this example, the Dim and Delay
elements are to be executed repeatedly.
Like the
Test element, you place the labels on the connecting lines by using the popup menu from
either of the elements connected to the
Repeat element.
In this example we also needed to use an
Exit element, since there was nothing we wanted to do
when the repeat was finished.
Hint: Note that in the above picture that the elements that are repeated are not connected back to
the Repeat element. To do so would cause your program not to function as you expect it.
The Exit element has a special use when used in conjunction with the Repeat element. The repeat
element can do one of two things. It can:
Terminate the sequence of elements that make up the body of the repeat and continue the
repeat with the next iteration
Terminate the repeat completely. That is, the next element executed will be the first element
in the
Done path.
Which action the Exit element takes depends upon the setting in the HCA Properties Visual
Programs tab.
The Validate button
After you have added all the elements you need in your program and connected them with
connecting lines, use the Validate button to perform a simple check. The validate operation can’t
guarantee that your program does what you want, but it does check for the most obvious errors. It
will check to see if: