Pelco Server C1553M-B User Manual

Page of 258
C1553M-B (4/05)
211
Timers
Timers are used to delay an action by a predetermined length of time. Timers themselves cannot run scripts, but you can use a timer to trigger a 
script to run.
Expression: Every timer has an expression associated with it. Whenever something happens that could affect the value of the expression, the 
expression is evaluated. If the expression becomes true as a result of the event, the timer starts counting down. If the expression becomes false 
as a result of the event, the timer is reset to its delay value. If the value of the expression does not change as a result of the event, the timer is 
unaffected. 
Property: Timers have one property, Value, that can be used in scripts and expressions. The Value property can be True or False (1 or 0). 
It becomes true when the timer reaches zero. It is reset to false when the timer is reset to its delay value.
States: Timers have three states: 
1. Reset: The timer is set to its delay value.
2. Countdown: The timer is counting down from its delay value.
3. Expired: The timer has finished counting down to zero.
Reset: In the timer’s reset state, the expression is false and the timer is set to its delay value. In this state, the Value property is false. 
Countdown: When something happens that could affect the value of the timer’s expression, the server evaluates the expression. If the 
expression becomes true as a result of the event, the timer is started. The Value property remains false. This is the countdown state. If an event 
occurs while the timer is counting down which makes the expression false, the timer is reset to its delay value.
Expired: If the timer counts all the way down to zero, the Value property becomes true. This is the expired state. The timer remains in the 
expired state until another event occurs which makes the expression false. 
 
summarizes how the Value property is affected by the expression and timer values.
Table AP.  Timer Property and Value
Use the Value property to trigger other actions. For example, you might define an alarm that alerts an operator when communications with a 
camera have been lost for 10 seconds. The timer’s expression is:
Camera1.CommLoss = True
The alarm’s expression is:
CommLossDelayTimer.Value = True
When Camera1 loses communications, the timer’s expression becomes true and the timer starts to count down from 10. When the timer reaches 
zero, the timer’s Value property becomes true, which makes the alarm’s expression true, triggering the alarm. 
STATE
EXPRESSION
TIMER
VALUE 
PROPERTY
Reset
0
delay value
0
Countdown
1
0 < timer < delay value
0
Expired
1
0
1