Allen-Bradley MicroLogix 1200 Reference Manual page 140

Hide thumbs Also See for MicroLogix 1200:
Table of Contents

Advertisement

8-8
Timer and Counter Instructions
Table 8.12 CTU Instruction Counter Control and Status Bits, Counter Word 0
(Data File 5 is configured as a timer file for this example.)
Bit
bit 12 - C5:0/OV OV - overflow
indicator
bit 13 - C5:0/DN DN - done
indicator
bit 15 - C5:0/CU CU - count up
enable
Table 8.13 CTD Instruction Counter Control and Status Bits, Counter Word 0
(Data File 5 is configured as a timer file for this example.)
Bit
bit 11 - C5:0/UN
UN - underflow
indicator
bit 13 - C5:0/DN
DN - done
indicator
bit 14 - C5:0/CD
CD - count down
enable
Publication 1762-RM001C-EN-P
The counter continues to count when the accumulator is
NOTE
greater than the CTU preset and when the accumulator is
less than the CTD preset.
Addressing Modes and File Types can be used as shown in the following
table:
Table 8.11 CTD and CTU Instructions Valid Addressing Modes and File Types
For definitions of the terms used in this table see Using the Instruction Descriptions on page4-2.
Data Files
Parameter
Counter
Preset
Accumulator
(1) Valid for Counter Files only.
Using Counter File Control and Status Bits
Like the accumulated value, the counter status bits are also retentive until
reset, as described below.
Is Set When:
the accumulated value wraps from +32,767
to -32,768 and continues to count up
accumulated value
preset value
rung state is true
Is Set When:
the accumulated value wraps from -32,768
to +32,767 and continues to count down
accumulated value
preset value
rung state is true
(1)
Function Files
And Remains Set Until One of the Following
Occurs:
a RES instruction with the same address as the CTU
instruction is enabled
• accumulated value < preset value or,
• a RES instruction with the same address as the CTU
instruction is enabled
• rung state is false
• a RES instruction with the same address as the CTU
instruction is enabled
And Remains Set Until One of the Following
Occurs:
a RES instruction with the same address as the CTD
instruction is enabled
• accumulated value
• a RES instruction with the same address as the
CTU instruction is enabled
• rung state is false
• a RES instruction with the same address as the
CTD instruction is enabled
Address
Address
Mode
Level
<
preset value or,

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Micrologix 1500

Table of Contents