beautypg.com

Counter instructions overview, Programming – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual

Page 113

background image

Using Basic Instructions

6–15

On returning to the REM Run or REM Test mode or when power is restored, the
following can happen:

Condition

Result

If the rung is true:

TT bit remains set.
EN bit remains set.
ACC value remains the same and resumes incrementing.

If the rung is false:

TT bit is reset.
DN bit remains in its last state.
EN bit is reset.
ACC value remains in its last state.

Counter Instructions Overview

Each Counter address is made of a 3-word data file element. Word 0 is the control
word, containing the status bits of the instruction. Word 1 is the preset value. Word
2 is the accumulated value.

The control word for counter instructions includes six status bits, as indicated below.

CU CD DN OV UN UA Not Used

15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00

Preset Value

Accumulator Value

CU = Counter up enable bit
CD = Counter down enable bit
DN = Done bit
OV = Overflow bit
UN = Underflow bit
UA = Update accumulator (HSC only)

Word 0

Word 1

Word 2

For high-speed counter instruction information, see chapter 12.

Programming