RTimeOut

(Engine-Level Function)

Description: Cumulative Timer. This function returns true when the total time that an expression is true reaches the specified value.
Returns: Boolean
Usage: Steady State only.
Function Groups: Time and Date
Related to: AbsTime | Latch | TimeOut | Toggle | Save
Format:  RTimeOut(Enable, Time)
Parameters:  
Enable
Required. Any numeric expression giving the condition that results in the timer counting. When this parameter is true (not 0), the timer is "running."
When this parameter is false (0), the timer stops but the total time accumulated so far is maintained as the point which counting will start when the parameter becomes true again.
Time
Required. Any numeric expression giving the time-out limit in seconds. When the cumulative time that Enable is true reaches this value, the function becomes true (1).
Comments: This function is reset when either parameter becomes invalid or when the state containing the function is started. When the function is reset, counting starts at 0 and the returned value is false (0). Note that this function is reset automatically when it occurs in a true action trigger or function parameter of a function which resets its parameters after evaluation (e.g. Latch, Toggle or Save).

Example:

ZText(10, 10 { X-Y coordinates },
      Cond(RTimeOut(motorRunning, 28800),
                    "Check motor - 8 hrs running time accumulated",
                    ""),
      0, 0 { Black text in default font });

This statement displays a message when the variable motorRunning has been true (any non-zero value) for 28800 seconds (8 hours).

Latching and Resetting Functions