Timer and Counter Instructions
Chapter 5
513
Figure 5.10
UpDown Counter Example
||
00
( CTU )
110 046
PR 220
AC 114
||
02
( CTD )
110 046
PR 220
AC 114
||
03
( CTR )
110 046
PR 220
AC 114
UpCount Event
DownCount Event
Counter Reset Event
NOTE: Bit 14 of the Accumulated Value word is set on when the
Accumulated Value either overflows or underflows. When a
Down-Counter Preset is set to 000, underflow bit 14 is not set on when the
count goes below zero.
When used alone, the CTD accumulated value may need to be reset in the
program to its original value (usually a value other than 000). For this
reason, a Get/Put transfer (Section 6.1), rather than a CTR instruction, is
usually used to load a value in the CTD Accumulated Value word. Get/Put
instructions are discussed in Section 6.1.
This output instruction is similar to a standard counter instruction. During
a true rung condition, the Accumulated Value is incremented once per
program scan (Figure 5.11). Unlike counters, however, the scan counter
does not count past the preset and resets when the rung goes false, power is
lost or the keyswitch is turned to program mode.
Figure 5.11
Scan Counter Instruction
||
03
( SCT )
113 053
PR 700
AC 359
5.2.4
Scan Counter Instruction
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com