Timers and Timing

There are three timer functions that return a value of "true" or "1" when a specified time period has elapsed. The first of these is the TimeOut function that returns a value of "true" only after a fixed period of time has elapsed. This function is often used in action triggers to cause an event to occur after a time delay.

The RTimeOut function is similar to TimeOut, except that it remembers the elapsed time accumulated so far, even when the enable parameter is false. For example, it can be used to test when a certain piece of equipment reaches a specific total cumulative running time.

The AbsTime function is used to check when a certain time occurs (relative to the real time clock). For example, AbsTime can test when the next time a shift change will occur. Since this function is tied into the real time clock, it is not subject to drift as is the TimeOut function. It is useful when you want to tie an event to a particular time of day rather than to a fixed time delay. If the absolute time of the event is important, AbsTime should be used; however, if the time of the event is meant to be relative to a randomly occurring event, TimeOut would be the most appropriate function to use.