beautypg.com

5ć13, 4 scan counter instruction – Rockwell Automation 1772-LP3 PLC - 2/30 Programmable Controller Programming and Operations Manual User Manual

Page 111

background image

Timer and Counter Instructions

Chapter 5

5Ć13

Figure 5.10

UpĆDown 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

UpĆCount Event

DownĆCount 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