Programming Reference / Timers / Non-Retentive Timer Example


A Non-Retentive timer is one that when a Stop command is given, upon the next leading edge of a Run signal, the Accumulator value resets to 0 and the timer’s Done condition becomes FALSE

Item Description
When the leading edge of the Run signal is made, the timer begins timing and the Accumulator holds the value of elapsed milliseconds. The Status value becomes 0 indicating that the timer is running.
The Accumulator value becomes equal to the Preset value. The Done value becomes TRUE, the Status value = 2 indicating the timer is stopped and Done elapsing. The Accumulator maintains its elapsed value.
Because the selected timer has not received a Stop command, any leading edge signal inputs for the Run command are ignored
When the leading edge of the Stop signal is made and the timer is Done, the timer sets an internal flag that tells it that upon the next leading edge of the Run signal to reset the Accumulator to 0 and begin timing
When the leading edge of the Run signal is made, the timer begins timing and the Accumulator value increases with the elapsed milliseconds. The Status value becomes 0 indicating that the timer is running and the Done value is set to FALSE.
When the Run signal is being maintained, a leading edge of the Stop signal will cause the timer to stop and Accumulator freezes at its last value. Also while the Stop signal is maintained, the timer remains stopped which is indicated by the Status value = 1. Because the Run signal is on when the Stop signal is removed, the Accumulator resets to 0 and the timer begins to run. The Status value then = 0 indicating the timer is running
The Accumulator value becomes equal to the Preset value. The Done value becomes TRUE and the Status value = 2 indicating the timer is stopped and no longer elapsing. The Accumulator maintains its elapsed value.