Although Time-Of-Day uses actual commands dedicated to performing TOD functions, time scheduling can be accomplished using the IF/THEN/ELSE command.

Example

The following example illustrates TOD scheduling using the IF/THEN/ELSE command to control the outdoor parking lights for a building.

The lights must be ON from 7:00 p.m. until 5:00 A.M. The IF/THEN/ELSE statement for this schedule might look like the following:

100  C THIS LINE OF CODE TURNS THE LIGHTS

102  C OFF AT 5:00 AM AND ON AT 7:00 PM.

104  C

110  IF(TIME.GT.5:00.AND.TIME.LT.19:00)THEN OFF(LITES)ELSE ON(LITES)