Timer block operation – Micromod MOD: 1800P - MOD 30ML Identity Module (Version 2) Algorithms, Tables and Sequential Logic Functions User Manual
Page 62

Logic Functions - Book 2
TIMER BLOCK
8-54
Figure 8-28. Timer Block (TM), General Menu
8.7.1
Timer Block Operation
When the timer block executes, its time value is incremented/decremented by the amount of
time that has passed between start times of the group scan period in which the timer block
exists. That is, the start time of the previous scan of the group is subtracted from the start
time of the current scan, and the result is added to/subtracted from the time value when the
timer block executes. The time value is kept in milliseconds; however, the accuracy of the
timer is limited to the scan cycle time of the task in which the timer block is executed (50ms to
1 second). A timing diagram of an up timer is shown in Figure 8-39 and a down timer is
shown in Figure 8-30.
During normal execution, the timer disable input determines execution of the timer. If it is
TRUE, the timer is held at its current value. If it is FALSE, the timer performs its function.
When the time value becomes greater than or equal to the high limit value for an UP timer, or
less than or equal to the low limit for a down timer, the appropriate limit status flag is set. If
Wrap is FALSE, the time value is no longer updated, and remains at its current value (which
may be beyond the limit due to variance in execution cycles) until a reset occurs or the
direction changes.
If the wrap flag is set when the time value is equal or beyond the appropriate limit, then the
amount of time beyond the limit is added to/subtracted from the opposite limit, and the time
value is set to the result. The limit status flag is held TRUE for one cycle.