|
The |
Controlling Your World One Contact At A Time |
||||||||||||||||||||||||
|
|
AB to AD - Timers And CountersTimersNote: Aspects of the storage requirements of timers and counters have been stated before in htis presentation. They are repeated here for emphasis.Timers come in two timebases and two types. The timebases are .1 seconds and .01 seconds. The types are 'standard' which resets when the enable line turns off and 'accumulating' (or retentive) which holds its count when the enable turns off and picks back up again when it turns back on. The accumulating type is reset by a separate command. The accumulating type also expects a 2 V register type preset and utilizes 2 V registers for the accumulator. To make room for this the accumulating timer also takes up the next named timer's position. (e.g. TMRA4 also utilizes the space of TMR5). Mark this off in comments when you create an accumulating timer.
CountersStandard counters (CNT) work as you would expect, incrementing on each ON transition of the enable line. They have separate reset lines attached to the same graphic box. An Up/Down counter (UDC) accepts two separate count lines (Up and Down) plus a reset line. A special UDC is available for counting high speed pulses. I'll leave that one for the manual section on high speed counter operation. Finally there is the Stage Counter (SGCNT). Don't be really confused by this one. It's only a standard counter without a reset line attached to the main graphic. It is assumed that you may wish to use it to count in one stage but have its reset operation controlled in another stage. The standard (CNT) and Stage counters (SGCNT) assume a 1 V memory preset (0 – 9999) and utilize 1 V memory for the accumulator. The UDC, like the accumulating timers above, expect up to a 2 V memory type preset (0 – 99999999) and utilize two V memories for the accumulator. Again, like the accumulating timer it takes up the next named counter's position.
ALL PRESETS AND ACCUMULATOR VALUES ARE BCD – PERIOD.Timers and Counters have JUST ONE status bit.It is a contact with the same name as the timer or counter. Thus this status bit for timer T1 is ... T1. Got it? This is analogous to the Done (.DN) bit in AB. The creation of the equivalent of an Enable bit (.EN) or a Timing bit (.TT) if really needed is trivial.Back To Introduction Please email comments to me at the address below.
|