SlideShare a Scribd company logo
Chapter 05 - Counters
Covered in class
Counters
 Common applications of counters include
keeping track of the number of items moving
past a given point, or determining the number of
times a given action occurs.
 A preset counter can
control an external circuit
when it’s counted total
matches the user-entered
preset limits.
Mechanical Counters
 Programmed counters
can serve the same
functions as mechanical
counters
 Every time the actuating
lever is moved or rotated,
the counter adds one or
subtracts one number.
The actuating lever then
returns automatically to
its original position.
Resetting the counter to
zero is usually done with
a pushbutton located on
the unit.
Electronic Counters
 Electronic counters can count up, count
down, or be combined to count up and
down. They are dependent on external
sources such as parts traveling past a
sensor or actuating a limit switch for
counting.
 PLC/PAC counters function in a very
similar manner.
PLC/PAC Counters
 PLC/PAC counters are usually ‘retentive’.
 Whatever count was contained in the counter
at the time of a processor shutdown will be
restored to the counter on power-up.
 A counter(s) can be reset on power-up if
the reset condition is activated at the time
of power restoration; the first scan.
 PLC/PAC counters can be designed to
count up to a preset value or to count
down to a preset value.
Counter Instructions –
Ladder Programming
 Allen Bradley ControlLogix has two instructions
available:
 CTU – Count UP
 CTD – Count DOWN
 Allen Bradley CCW has three counter instructions
available: (IEC 61131-3)
 CTU – Count UP
 CTD – Count DOWN
 CTUD – Count UP-DOWN
 Siemens has three counter instruction available:
(IEC 61131-3)
 CTU – Count UP
 CTD – Count DOWN
 CTUD – Count UP-DOWN
ControlLogix CTU
Counter tag name:
Ex. cartonCount
Preset – Number of items or
events to count before an
output occurs
Accumulator – The
current number of
counts on the counter
 ControlLogix CTU counter has three parameters.
ControlLogix Counter
Parameters
 Counter
 The tag name of the counter. Example:
cartonCount. The tag is created as a Counter
Data Type.
 Preset Value (PRE)
 The Preset value is the number of counts that
should occur before the counting event is done.
The valid range is:
 -2,147,483,648 to 2,147,483,647
 Accumulator Value (ACC)
 Stores the current count value of the counter. The
value range is the same as the preset parameter.
ControlLogix Counter
Memory
 Counters use a counter data type called a
Structure. Structures are data types that
consist of more than one word.
 The Counter structure consists of three,
32-bit words where:
 Word 0 of the structure stores the Status bits
of the counter.
 Word 1 of the structure stores the Preset
value.
 Word 2 of the structure stores the
Accumulator value.
ControlLogix Counter
Memory
 There are five counter status bits:
 CU – Count UP (CTU only)
 CD – Count DOWN (CTD only)
 DN – Done (CTU & CTD)
 OV – Overflow (CTU only)
 UN – Underflow (CTD only)
Structure
members
The plus (+) sign is
used to drill into the
structure. The minus
(-) is used to collapse
a structure
Data types of the
members of the
structure.
Counter Status Bits
 Count UP (CU) (CTU only)
 Sets to a logic ‘1’ when the rung containing the
Count UP (CTU) counter is true, otherwise it is a
logic ‘0’.
 Count DOWN (CD) (CTD only)
 Sets to a logic ‘1’ when the rung containing the
Count DOWN (CTD) counter is true, otherwise it
is a logic ‘0’.
 Done (DN)
 Sets to a logic ‘1’ when the Accumulator value is
greater than or equal to the preset value
(ACC  PRE), other wise it is a logic ‘0’.
Counter Status Bits
 Overflow (OV) (CTU only)
 Used with the Count UP (CTU) counter. If the
accumulator has reached a maximum positive
value of +2,147,483,647 and the counter is
incremented up again, the accumulator will wrap
around to -2,147,483,648. When this wrap around
occurs, the Overflow (OV) bit will set to a logic ‘1’.
If the Done (DN) bit is set to a ‘1’ and the counter
overflows, the Done (DN) bit will remain a ‘1’,
even if the accumulator is less than the preset
(ACC < PRE). The counter must be reset with the
RES instruction to reset the Overflow (OV) bit to a
logic ‘0’ and to clear the Done (DN) bit.
Counter Status Bits
 Underflow (UN) (CTD only)
 Used with the Count DOWN (CTD) counter. If the
accumulator has reached a minimum negative
value of -2,147,483,648 and the counter is
decremented down again, the accumulator will
wrap around to +2,147,483,647. When this wrap
around occurs, the Underflow (UN) bit will set to a
logic ‘1’. If the Done (DN) bit is set to a ‘1’ and the
counter underflows, the Done (DN) bit will remain
a ‘1’, even if the accumulator is less than the
preset (ACC < PRE). The counter must be reset
with the RES instruction to reset the underflow
(UN) bit to a logic ‘0’ and to clear the Done (DN)
bit.
CTU Functionality
 Count UP counters count false to
true rung transitions. Each false to
true transition generates one count
on the CTU counter.
 When the rung is true, the Count
UP (CU) bit is set to a ‘1’. When
the rung is false, the Count UP
(CU) is reset to a ‘0’.
 When the ACC  PRE, the Done
(DN) bit is set to a ‘1’. An RES
instruction is required to reset the
accumulator to zero.
Rung CU OV DN ACC
0 0 1
0 0 2
0 0 500
0 1 1000
0 1 1050
0 1 Max+
1 1 Min-
Accessing Counter Data
 The ‘dot’ notation is used to access the data
of a counter structure.
 To access the status bits of the cartonCount:
 The Done (DN) bit would be the, counter tag,
‘dot’, the bit designator
 cartonCount.DN
 The other status bits are accessed in a
similar manner:
 cartonCount.CU for the Counter Count UP Bit
 cartonCount.OV for the Counter Overflow Bit
Accessing Counter Data
 The ‘dot’ notation is used to access the data
of a counter structure.
 To access the value of the preset or the
accumulator words:
 cartonCount.PRE for the Preset value
 cartonCount.ACC for the Accumulator value
 All words can also be referenced to bit level,
therefore:
 cartonCount.ACC.5 would be bit 5 of the
Accumulator word of the cartonCount counter.
 cartonCount.PRE.12 would be bit 12 of the
Preset word of the cartonCount counter.
ControlLogix CTU
Counter
ControlLogix CTD
 ControlLogix CTD counter has three
parameters.
Counter tag name:
Ex. bottleExiting
Preset – Number of events to
count before an output occurs
Accumulator – The
current number of
counts on the counter
ControlLogix Counter
Parameters
 Counter
 The tag name of the counter. Example:
bottleExiting. The tag is created as a Counter
Data Type.
 Preset Value (PRE)
 The Preset value is the number of counts that
should occur before the counting event is done.
The valid range is:
 -2,147,483,648 to 2,147,483,647
 Accumulator Value (ACC)
 Stores the current count value of the counter. The
value range is the same as the preset parameter.
ControlLogix Counter
Memory
 Counters use a counter data type called a
Structure. Structures are data types that
consist of more than one word.
 The Counter structure consists of three,
32-bit words where:
 Word 0 of the structure stores the Status bits
of the counter.
 Word 1 of the structure stores the Preset
value.
 Word 2 of the structure stores the
Accumulator value.
ControlLogix Counter
Memory
 There are five counter status bits:
 CU – Count UP (CTU only)
 CD – Count DOWN (CTD only)
 DN – Done (CTU & CTD)
 OV – Overflow (CTU only)
 UN – Underflow (CTD only)
Structure
members
The plus (+) sign is
used to drill into the
structure. The minus
(-) is used to collapse
a structure
Data types of the
members of the
structure.
Counter Status Bits
 Count UP (CU) (CTU only)
 Sets to a logic ‘1’ when the rung containing the
Count UP (CTU) counter is true, otherwise it is a
logic ‘0’.
 Count DOWN (CD) (CTD only)
 Sets to a logic ‘1’ when the rung containing the
Count DOWN (CTD) counter is true, otherwise it
is a logic ‘0’.
 Done (DN)
 Sets to a logic ‘1’ when the Accumulator value is
greater than or equal to the preset value
(ACC  PRE), other wise it is a logic ‘0’.
Counter Status Bits
 Overflow (OV) (CTU only)
 Used with the Count UP (CTU) counter. If the
accumulator has reached a maximum positive
value of +2,147,483,647 and the counter is
incremented up again, the accumulator will wrap
around to -2,147,483,648. When this wrap around
occurs, the Overflow (OV) bit will set to a logic ‘1’.
If the Done (DN) bit is set to a ‘1’ and the counter
overflows, the Done (DN) bit will remain a ‘1’,
even if the accumulator is less than the preset
(ACC < PRE). The counter must be reset with the
RES instruction to reset the Overflow (OV) bit to a
logic ‘0’ and to clear the Done (DN) bit.
Counter Status Bits
 Underflow (UN) (CTD only)
 Used with the Count DOWN (CTD) counter. If the
accumulator has reached a minimum negative
value of -2,147,483,648 and the counter is
decremented down again, the accumulator will
wrap around to +2,147,483,647. When this wrap
around occurs, the Underflow (UN) bit will set to a
logic ‘1’. If the Done (DN) bit is set to a ‘1’ and the
counter underflows, the Done (DN) bit will remain
a ‘1’, even if the accumulator is less than the
preset (ACC < PRE). The counter must be reset
with the RES instruction to reset the underflow
(UN) bit to a logic ‘0’ and to clear the Done (DN)
bit.
CTD Status Bit
Functionality
 Count DOWN counters count false to
true rung transitions. Each false to true
decrements one count on the CTD
counter.
 When the rung is true, the Count
DOWN (CD) bit is set to a ‘1’. When the
rung is false, the Count DOWN (CD) is
reset to a ‘0’.
 When the ACC  PRE, the Done (DN)
bit is set to a ‘1’. An RES instruction is
required to reset the accumulator to
zero.
Rung CD UN DN ACC
0 1 -1
0 1 -36
0 1 -50
0 0 -51
0 0 -53
0 0 Min -
1 0 Max +
Accessing Counter Data
 The ‘dot’ notation is used to access the data
of a counter structure.
 To access the status bits of the bottleExiting:
 The Done (DN) bit would be the counter tag, ‘dot’,
the bit designator
 bottleExiting.DN
 The other status bits are accessed in a
similar manner:
 bottleExiting.CD for the Count DOWN Bit
 bottleExiting.UN for the Underflow Bit
Accessing Counter Data
 The ‘dot’ notation is used to access the data
of a counter structure.
 To access the value of the preset or the
accumulator words:
 bottleExiting.PRE for the Preset value
 bottleExiting.ACC for the Accumulator value
 All words can also be referenced to bit level,
therefore:
 bottleExiting.ACC.5 would be bit 5 of the
Accumulator word of the bottleExiting counter.
 bottleExiting.PRE.12 would be bit 12 of the
Preset word of the bottleExiting counter.
ControlLogix CTD
Counter
COUNTER EXAMPLES
Parts Counting
 Counter totalNumOfParts
counts the total number of
parts coming off an assembly
line for final packaging.
 Each package must contain
10-parts.
 When 10-parts are detected,
counter numberOfParts sets bit
intBoxClosSeq to initiate the
box closing sequence.
 Counter totalPackages counts
the total number of packages
filled per day.
 A push button is used to restart
the total part and package
count to zero, daily.
http://www.keyence.com/img/products/series/il_ws_sr48219_device_count.gif
Parts Counting
Program continued on next slide
Parts Counting
Conveyor Motor
 This circuit will use a oneshot
for reset and another oneshot
to prevent the PLC from
seeing chatter from the
sensor.
 Sequential task:
 The VFD is used to start the
conveyor motor.
 Parts pass the sensor and
increment a counter
accumulator.
 After 50-counts, the conveyor
motor automatically stops and
the counter accumulator is reset.
 The conveyor motor can be
stopped or started manually at
any time without loss of
accumulator counts.
http://www.keyence.com/img/products/series/il_ws_sr48219_device_count.gif
Conveyor Motor
Alarm Monitor
 The alarm is triggered by the closing of liquid level
switch LS1.
 The alarm light will flash whenever the alarm
condition is triggered and has not been
acknowledged, even if the alarm condition clears
in the meantime.
 The alarm is acknowledged by closing selector
switch SS1.
 The alarm light will operate in the steady mode
when the alarm trigger condition exits but has
been acknowledged.
Alarm Monitor
Parking Garage Counter
 As a car enters the parking garage it triggers an up
counter and increments the accumulator by one count.
 As a car leaves the parking garage it triggers a down
counter and decrements the accumulator by one count.
 The up and down counters will use the same tag name.
Since the counters have the same tag name, the
accumulated value is the same for both counters.
 Whenever the accumulator value is equal to the preset
value, the counter output is energized to light the “Lot
Full” sign.
Parking Garage Counter
IEC Counters
 The IEC 31161-3 standard specifies three
counters:
 Count UP – CTU
 Count DOWN – CTD
 Count UP/DOWN – CTUD
 The functionality of the CTU and CTD are
basically the same as the ControlLogix
counters.
 Siemens and Allen Bradley CCW use the
IEC standard counters.
IEC 31161-3 CTU
 The IEC 31161-3 CTU has three inputs and two
outputs:
 IN – Data type BOOL ≡ Count UP (CU)
 R – Data type BOOL (Reset the counter)
 PV – Data type DINT ≡ Preset (PRE)
 Q – Data type BOOL ≡ Done Bit (DN)
 CV – Data type DINT ≡ Accumulator (ACC)
Siemens counter shown
IEC 31161-3 CTD
 The IEC 31161-3 CTD has two inputs and two
outputs:
 CD – Data type BOOL ≡ Count DOWN (CD)
 LD – Data type BOOL – Load (CV = PV when LD is True)
 PV – Data type DINT ≡ Preset (PRE)
 Q – Data type BOOL ≡ Done Bit (DN)
 CV – Data type DINT ≡ Accumulator (ACC)
Siemens counter shown
IEC 31161-3 CTUD
 The IEC 31161-3 CTD has five inputs and three
outputs:
 CU – Data type BOOL ≡ Count UP (CU)
 CD – Data type BOOL ≡ Count DOWN (CD)
 R – Data type BOOL (Reset the counter)
 LD – Data type BOOL – Load (CV = PV when LD is
True)
 PV – Data type DINT ≡ Preset (PRE)
 QU – Data type BOOL ≡ Overflow (OV)
True when CV  PV
 QD – Data type BOOL ≡ Underflow (UN)
True when CV  PV
 CV – Data type DINT ≡ Accumulator (ACC)
IEC 31161-3 CTD
Siemens counter shown
IEC 31161-3 Counters -
CCW
 The Allen Bradley CCW software uses the same
type of counter with the same functionality.
IEC 31161-3 Counters -
CCW
 The Allen Bradley CCW software uses the same
type of counters with the same functionality.
References
Dagget, R. (n.d.). 3 Options for Starting and Stopping an AC Motor. Retrieved October 28,
2016, from Bastian Solutions:
https://www.bastiansolutions.com/blog/index.php/2014/03/17/3-options-for-starting-and-
stopping-ac-motor/#.WBO20y0rLiw
Direct Industry. (n.d). Digital Up-Down Counters. Retrieved October 2016, 2016, from Direct
Industry: http://www.directindustry.com/industrial-manufacturer/digital-up-down-counter-
159777.html
Direct Industry. (n.d.). Line Seike. Retrieved October 25, 2016, from Direct Industry:
http://www.directindustry.com/prod/line-seiki/product-23163-633672.html
Find Icons. (n.d.). Reset. Retrieved October 28, 2016, from Find Icons:
http://findicons.com/search/reset
Keyence America. (n.d.). An Even Wider Range of Applications. Retrieved October 28, 2016,
from Keyence America: http://www.keyence.com/products/measure/laser-
1d/il/applications/index.jsp
Newark element14. (n.d.). Veeder Root 0166726-006 Mechanical Counter, Ratchet Drive.
Retrieved October 25, 2016, from Newark element 14: http://www.newark.com/veeder-
root/0166726-006/mechanical-counter-ratchet-drive/dp/88C9906

More Related Content

What's hot

MSI Counters
MSI CountersMSI Counters
MSI Counters
Abhilash Nair
 
Modulo n counter
Modulo n counterModulo n counter
Modulo n counter
Manoj Guha
 
03 analog control_sp17
03 analog control_sp1703 analog control_sp17
03 analog control_sp17
John Todora
 
COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)
SUBHA SHREE
 
12 chapter06 math_instructions_fa14
12 chapter06 math_instructions_fa1412 chapter06 math_instructions_fa14
12 chapter06 math_instructions_fa14
John Todora
 
10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
John Todora
 
Synchronous Counter
Synchronous Counter Synchronous Counter
Synchronous Counter
Akhilesh Kushwaha
 
Chapter#8
Chapter#8Chapter#8
FYBSC IT Digital Electronics Unit V Chapter I Counters
FYBSC IT Digital Electronics Unit V Chapter I CountersFYBSC IT Digital Electronics Unit V Chapter I Counters
FYBSC IT Digital Electronics Unit V Chapter I Counters
Arti Parab Academics
 
DELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterDELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counter
KanchanPatil34
 
FYBSC IT Digital Electronics Unit V Chapter II Shift Register
FYBSC IT Digital Electronics Unit V Chapter II Shift RegisterFYBSC IT Digital Electronics Unit V Chapter II Shift Register
FYBSC IT Digital Electronics Unit V Chapter II Shift Register
Arti Parab Academics
 
Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16
John Todora
 
Counters ibrahem
Counters ibrahemCounters ibrahem
Counters ibrahem
Ibranoz1990
 
Synchronous Counter in Digital Logic Device
Synchronous Counter in Digital Logic DeviceSynchronous Counter in Digital Logic Device
Synchronous Counter in Digital Logic Device
Sonya Akter Rupa
 
00 chapter07 and_08_conversion_subroutines_force_sp13
00 chapter07 and_08_conversion_subroutines_force_sp1300 chapter07 and_08_conversion_subroutines_force_sp13
00 chapter07 and_08_conversion_subroutines_force_sp13
John Todora
 
G. ripple counter
G. ripple counterG. ripple counter
G. ripple counter
john lexter emberador
 
Synchronous down counter
Synchronous down counterSynchronous down counter
Synchronous down counter
RONAK SUTARIYA
 
Module 4 registers and counters
Module 4 registers and counters Module 4 registers and counters
Module 4 registers and counters
Deepak John
 
Ring counter
Ring counterRing counter
Ring counter
Ghufran Hasan
 
Counters &amp; time delay
Counters &amp; time delayCounters &amp; time delay
Counters &amp; time delay
Hemant Chetwani
 

What's hot (20)

MSI Counters
MSI CountersMSI Counters
MSI Counters
 
Modulo n counter
Modulo n counterModulo n counter
Modulo n counter
 
03 analog control_sp17
03 analog control_sp1703 analog control_sp17
03 analog control_sp17
 
COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)COUNTERS(Synchronous & Asynchronous)
COUNTERS(Synchronous & Asynchronous)
 
12 chapter06 math_instructions_fa14
12 chapter06 math_instructions_fa1412 chapter06 math_instructions_fa14
12 chapter06 math_instructions_fa14
 
10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
 
Synchronous Counter
Synchronous Counter Synchronous Counter
Synchronous Counter
 
Chapter#8
Chapter#8Chapter#8
Chapter#8
 
FYBSC IT Digital Electronics Unit V Chapter I Counters
FYBSC IT Digital Electronics Unit V Chapter I CountersFYBSC IT Digital Electronics Unit V Chapter I Counters
FYBSC IT Digital Electronics Unit V Chapter I Counters
 
DELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterDELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counter
 
FYBSC IT Digital Electronics Unit V Chapter II Shift Register
FYBSC IT Digital Electronics Unit V Chapter II Shift RegisterFYBSC IT Digital Electronics Unit V Chapter II Shift Register
FYBSC IT Digital Electronics Unit V Chapter II Shift Register
 
Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16
 
Counters ibrahem
Counters ibrahemCounters ibrahem
Counters ibrahem
 
Synchronous Counter in Digital Logic Device
Synchronous Counter in Digital Logic DeviceSynchronous Counter in Digital Logic Device
Synchronous Counter in Digital Logic Device
 
00 chapter07 and_08_conversion_subroutines_force_sp13
00 chapter07 and_08_conversion_subroutines_force_sp1300 chapter07 and_08_conversion_subroutines_force_sp13
00 chapter07 and_08_conversion_subroutines_force_sp13
 
G. ripple counter
G. ripple counterG. ripple counter
G. ripple counter
 
Synchronous down counter
Synchronous down counterSynchronous down counter
Synchronous down counter
 
Module 4 registers and counters
Module 4 registers and counters Module 4 registers and counters
Module 4 registers and counters
 
Ring counter
Ring counterRing counter
Ring counter
 
Counters &amp; time delay
Counters &amp; time delayCounters &amp; time delay
Counters &amp; time delay
 

Similar to ControlLogix Counters FA16

Lect06
Lect06Lect06
PLC PROGRAMMING- COUNTER INSTRUCTION
PLC PROGRAMMING- COUNTER INSTRUCTIONPLC PROGRAMMING- COUNTER INSTRUCTION
PLC PROGRAMMING- COUNTER INSTRUCTION
Paheerathan Sabaratnam
 
Computer arithmetics coa project pdf version
Computer arithmetics coa project pdf versionComputer arithmetics coa project pdf version
Computer arithmetics coa project pdf version
SuryaKumarSahani
 
Computer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) pptComputer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) ppt
SuryaKumarSahani
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
Edhole.com
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
Edhole.com
 
Ladder Intro Tutorial
Ladder Intro TutorialLadder Intro Tutorial
Ladder Intro Tutorial
plc_course
 
Logic and Distributed Control Systems (PLC timer and counter).pptx
Logic and Distributed Control Systems (PLC timer and counter).pptxLogic and Distributed Control Systems (PLC timer and counter).pptx
Logic and Distributed Control Systems (PLC timer and counter).pptx
DrAyyarKandasamy
 
Registers and counters
Registers and countersRegisters and counters
Registers and counters
Heman Pathak
 
Counter - by Zakariya Hossain
Counter - by Zakariya HossainCounter - by Zakariya Hossain
Counter - by Zakariya Hossain
Zakariya Hossain
 
Digital Electronics Registers and Counters.pptx
Digital Electronics Registers and Counters.pptxDigital Electronics Registers and Counters.pptx
Digital Electronics Registers and Counters.pptx
navaneethakrishnanec
 
Digital Logic Counter.ppt
Digital Logic Counter.pptDigital Logic Counter.ppt
Digital Logic Counter.ppt
RaziyaSultana30
 
Unit_2 (4).pptx
Unit_2 (4).pptxUnit_2 (4).pptx
Unit_2 (4).pptx
AyushiBhatla
 
Chapter 16 timers and counters
Chapter 16 timers and countersChapter 16 timers and counters
Chapter 16 timers and counters
forgotteniman
 
Converting Capacitance Into Controller Counts
Converting Capacitance Into Controller CountsConverting Capacitance Into Controller Counts
Converting Capacitance Into Controller Counts
Fieldscale
 
Ddhdl 17
Ddhdl 17Ddhdl 17
Ddhdl 17
Akhil Maddineni
 
FREQUENCY COUNTERS AND TIME-INTERVAL MEASUREMENTS.pdf
FREQUENCY COUNTERS AND TIME-INTERVAL MEASUREMENTS.pdfFREQUENCY COUNTERS AND TIME-INTERVAL MEASUREMENTS.pdf
FREQUENCY COUNTERS AND TIME-INTERVAL MEASUREMENTS.pdf
ssuser72979d
 
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Prof. Swapnil V. Kaware
 
Project Report On 0-9 decade counter
Project Report On 0-9 decade counterProject Report On 0-9 decade counter
Project Report On 0-9 decade counter
Omkar Rane
 
Elevator1
Elevator1Elevator1
Elevator1
cognosvlsi
 

Similar to ControlLogix Counters FA16 (20)

Lect06
Lect06Lect06
Lect06
 
PLC PROGRAMMING- COUNTER INSTRUCTION
PLC PROGRAMMING- COUNTER INSTRUCTIONPLC PROGRAMMING- COUNTER INSTRUCTION
PLC PROGRAMMING- COUNTER INSTRUCTION
 
Computer arithmetics coa project pdf version
Computer arithmetics coa project pdf versionComputer arithmetics coa project pdf version
Computer arithmetics coa project pdf version
 
Computer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) pptComputer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) ppt
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
 
Ladder Intro Tutorial
Ladder Intro TutorialLadder Intro Tutorial
Ladder Intro Tutorial
 
Logic and Distributed Control Systems (PLC timer and counter).pptx
Logic and Distributed Control Systems (PLC timer and counter).pptxLogic and Distributed Control Systems (PLC timer and counter).pptx
Logic and Distributed Control Systems (PLC timer and counter).pptx
 
Registers and counters
Registers and countersRegisters and counters
Registers and counters
 
Counter - by Zakariya Hossain
Counter - by Zakariya HossainCounter - by Zakariya Hossain
Counter - by Zakariya Hossain
 
Digital Electronics Registers and Counters.pptx
Digital Electronics Registers and Counters.pptxDigital Electronics Registers and Counters.pptx
Digital Electronics Registers and Counters.pptx
 
Digital Logic Counter.ppt
Digital Logic Counter.pptDigital Logic Counter.ppt
Digital Logic Counter.ppt
 
Unit_2 (4).pptx
Unit_2 (4).pptxUnit_2 (4).pptx
Unit_2 (4).pptx
 
Chapter 16 timers and counters
Chapter 16 timers and countersChapter 16 timers and counters
Chapter 16 timers and counters
 
Converting Capacitance Into Controller Counts
Converting Capacitance Into Controller CountsConverting Capacitance Into Controller Counts
Converting Capacitance Into Controller Counts
 
Ddhdl 17
Ddhdl 17Ddhdl 17
Ddhdl 17
 
FREQUENCY COUNTERS AND TIME-INTERVAL MEASUREMENTS.pdf
FREQUENCY COUNTERS AND TIME-INTERVAL MEASUREMENTS.pdfFREQUENCY COUNTERS AND TIME-INTERVAL MEASUREMENTS.pdf
FREQUENCY COUNTERS AND TIME-INTERVAL MEASUREMENTS.pdf
 
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
 
Project Report On 0-9 decade counter
Project Report On 0-9 decade counterProject Report On 0-9 decade counter
Project Report On 0-9 decade counter
 
Elevator1
Elevator1Elevator1
Elevator1
 

More from John Todora

04 scaling analog_datal_sp17
04 scaling analog_datal_sp1704 scaling analog_datal_sp17
04 scaling analog_datal_sp17
John Todora
 
01 control logix_arrays_sp17
01 control logix_arrays_sp1701 control logix_arrays_sp17
01 control logix_arrays_sp17
John Todora
 
Comparison instructions, AB, Siemens and AB CCW
Comparison instructions, AB, Siemens and AB CCWComparison instructions, AB, Siemens and AB CCW
Comparison instructions, AB, Siemens and AB CCW
John Todora
 
Lab02 review
Lab02 reviewLab02 review
Lab02 review
John Todora
 
Subroutines rev01 fa16
Subroutines rev01 fa16Subroutines rev01 fa16
Subroutines rev01 fa16
John Todora
 
Move mask moves_rev01_fa16
Move mask moves_rev01_fa16Move mask moves_rev01_fa16
Move mask moves_rev01_fa16
John Todora
 
Lab02 lead in
Lab02 lead inLab02 lead in
Lab02 lead in
John Todora
 
02 chapter02 fa16
02 chapter02 fa1602 chapter02 fa16
02 chapter02 fa16
John Todora
 
01 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa1601 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa16
John Todora
 
07 chapter07 loop_diagrams
07 chapter07 loop_diagrams07 chapter07 loop_diagrams
07 chapter07 loop_diagrams
John Todora
 
06 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev0206 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev02
John Todora
 
04 chapter04 specification_forms
04 chapter04 specification_forms04 chapter04 specification_forms
04 chapter04 specification_forms
John Todora
 
03 chapter03 lists_indexes_databases
03 chapter03 lists_indexes_databases03 chapter03 lists_indexes_databases
03 chapter03 lists_indexes_databases
John Todora
 
02 chapter02 p&ids_and_symbols_split_animations
02 chapter02 p&ids_and_symbols_split_animations02 chapter02 p&ids_and_symbols_split_animations
02 chapter02 p&ids_and_symbols_split_animations
John Todora
 
01 chapter01 process_flow_diagram
01 chapter01 process_flow_diagram01 chapter01 process_flow_diagram
01 chapter01 process_flow_diagram
John Todora
 
00 introduction
00 introduction00 introduction
00 introduction
John Todora
 
EMEC130 P&ID Symbol Primer
EMEC130 P&ID Symbol PrimerEMEC130 P&ID Symbol Primer
EMEC130 P&ID Symbol Primer
John Todora
 
02 copy file_fill_sp16
02 copy file_fill_sp1602 copy file_fill_sp16
02 copy file_fill_sp16
John Todora
 
Control Systems Basics
Control Systems BasicsControl Systems Basics
Control Systems Basics
John Todora
 
01 overview of_industrial_automation_sp15
01 overview of_industrial_automation_sp1501 overview of_industrial_automation_sp15
01 overview of_industrial_automation_sp15
John Todora
 

More from John Todora (20)

04 scaling analog_datal_sp17
04 scaling analog_datal_sp1704 scaling analog_datal_sp17
04 scaling analog_datal_sp17
 
01 control logix_arrays_sp17
01 control logix_arrays_sp1701 control logix_arrays_sp17
01 control logix_arrays_sp17
 
Comparison instructions, AB, Siemens and AB CCW
Comparison instructions, AB, Siemens and AB CCWComparison instructions, AB, Siemens and AB CCW
Comparison instructions, AB, Siemens and AB CCW
 
Lab02 review
Lab02 reviewLab02 review
Lab02 review
 
Subroutines rev01 fa16
Subroutines rev01 fa16Subroutines rev01 fa16
Subroutines rev01 fa16
 
Move mask moves_rev01_fa16
Move mask moves_rev01_fa16Move mask moves_rev01_fa16
Move mask moves_rev01_fa16
 
Lab02 lead in
Lab02 lead inLab02 lead in
Lab02 lead in
 
02 chapter02 fa16
02 chapter02 fa1602 chapter02 fa16
02 chapter02 fa16
 
01 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa1601 introduction to_plc-pac_rev01_fa16
01 introduction to_plc-pac_rev01_fa16
 
07 chapter07 loop_diagrams
07 chapter07 loop_diagrams07 chapter07 loop_diagrams
07 chapter07 loop_diagrams
 
06 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev0206 chapter06 binary_logic_systems_Rev02
06 chapter06 binary_logic_systems_Rev02
 
04 chapter04 specification_forms
04 chapter04 specification_forms04 chapter04 specification_forms
04 chapter04 specification_forms
 
03 chapter03 lists_indexes_databases
03 chapter03 lists_indexes_databases03 chapter03 lists_indexes_databases
03 chapter03 lists_indexes_databases
 
02 chapter02 p&ids_and_symbols_split_animations
02 chapter02 p&ids_and_symbols_split_animations02 chapter02 p&ids_and_symbols_split_animations
02 chapter02 p&ids_and_symbols_split_animations
 
01 chapter01 process_flow_diagram
01 chapter01 process_flow_diagram01 chapter01 process_flow_diagram
01 chapter01 process_flow_diagram
 
00 introduction
00 introduction00 introduction
00 introduction
 
EMEC130 P&ID Symbol Primer
EMEC130 P&ID Symbol PrimerEMEC130 P&ID Symbol Primer
EMEC130 P&ID Symbol Primer
 
02 copy file_fill_sp16
02 copy file_fill_sp1602 copy file_fill_sp16
02 copy file_fill_sp16
 
Control Systems Basics
Control Systems BasicsControl Systems Basics
Control Systems Basics
 
01 overview of_industrial_automation_sp15
01 overview of_industrial_automation_sp1501 overview of_industrial_automation_sp15
01 overview of_industrial_automation_sp15
 

Recently uploaded

How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
sayalidalavi006
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 

Recently uploaded (20)

How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 

ControlLogix Counters FA16

  • 1. Chapter 05 - Counters Covered in class
  • 2. Counters  Common applications of counters include keeping track of the number of items moving past a given point, or determining the number of times a given action occurs.  A preset counter can control an external circuit when it’s counted total matches the user-entered preset limits.
  • 3. Mechanical Counters  Programmed counters can serve the same functions as mechanical counters  Every time the actuating lever is moved or rotated, the counter adds one or subtracts one number. The actuating lever then returns automatically to its original position. Resetting the counter to zero is usually done with a pushbutton located on the unit.
  • 4. Electronic Counters  Electronic counters can count up, count down, or be combined to count up and down. They are dependent on external sources such as parts traveling past a sensor or actuating a limit switch for counting.  PLC/PAC counters function in a very similar manner.
  • 5. PLC/PAC Counters  PLC/PAC counters are usually ‘retentive’.  Whatever count was contained in the counter at the time of a processor shutdown will be restored to the counter on power-up.  A counter(s) can be reset on power-up if the reset condition is activated at the time of power restoration; the first scan.  PLC/PAC counters can be designed to count up to a preset value or to count down to a preset value.
  • 6. Counter Instructions – Ladder Programming  Allen Bradley ControlLogix has two instructions available:  CTU – Count UP  CTD – Count DOWN  Allen Bradley CCW has three counter instructions available: (IEC 61131-3)  CTU – Count UP  CTD – Count DOWN  CTUD – Count UP-DOWN  Siemens has three counter instruction available: (IEC 61131-3)  CTU – Count UP  CTD – Count DOWN  CTUD – Count UP-DOWN
  • 7. ControlLogix CTU Counter tag name: Ex. cartonCount Preset – Number of items or events to count before an output occurs Accumulator – The current number of counts on the counter  ControlLogix CTU counter has three parameters.
  • 8. ControlLogix Counter Parameters  Counter  The tag name of the counter. Example: cartonCount. The tag is created as a Counter Data Type.  Preset Value (PRE)  The Preset value is the number of counts that should occur before the counting event is done. The valid range is:  -2,147,483,648 to 2,147,483,647  Accumulator Value (ACC)  Stores the current count value of the counter. The value range is the same as the preset parameter.
  • 9. ControlLogix Counter Memory  Counters use a counter data type called a Structure. Structures are data types that consist of more than one word.  The Counter structure consists of three, 32-bit words where:  Word 0 of the structure stores the Status bits of the counter.  Word 1 of the structure stores the Preset value.  Word 2 of the structure stores the Accumulator value.
  • 10. ControlLogix Counter Memory  There are five counter status bits:  CU – Count UP (CTU only)  CD – Count DOWN (CTD only)  DN – Done (CTU & CTD)  OV – Overflow (CTU only)  UN – Underflow (CTD only) Structure members The plus (+) sign is used to drill into the structure. The minus (-) is used to collapse a structure Data types of the members of the structure.
  • 11. Counter Status Bits  Count UP (CU) (CTU only)  Sets to a logic ‘1’ when the rung containing the Count UP (CTU) counter is true, otherwise it is a logic ‘0’.  Count DOWN (CD) (CTD only)  Sets to a logic ‘1’ when the rung containing the Count DOWN (CTD) counter is true, otherwise it is a logic ‘0’.  Done (DN)  Sets to a logic ‘1’ when the Accumulator value is greater than or equal to the preset value (ACC  PRE), other wise it is a logic ‘0’.
  • 12. Counter Status Bits  Overflow (OV) (CTU only)  Used with the Count UP (CTU) counter. If the accumulator has reached a maximum positive value of +2,147,483,647 and the counter is incremented up again, the accumulator will wrap around to -2,147,483,648. When this wrap around occurs, the Overflow (OV) bit will set to a logic ‘1’. If the Done (DN) bit is set to a ‘1’ and the counter overflows, the Done (DN) bit will remain a ‘1’, even if the accumulator is less than the preset (ACC < PRE). The counter must be reset with the RES instruction to reset the Overflow (OV) bit to a logic ‘0’ and to clear the Done (DN) bit.
  • 13. Counter Status Bits  Underflow (UN) (CTD only)  Used with the Count DOWN (CTD) counter. If the accumulator has reached a minimum negative value of -2,147,483,648 and the counter is decremented down again, the accumulator will wrap around to +2,147,483,647. When this wrap around occurs, the Underflow (UN) bit will set to a logic ‘1’. If the Done (DN) bit is set to a ‘1’ and the counter underflows, the Done (DN) bit will remain a ‘1’, even if the accumulator is less than the preset (ACC < PRE). The counter must be reset with the RES instruction to reset the underflow (UN) bit to a logic ‘0’ and to clear the Done (DN) bit.
  • 14. CTU Functionality  Count UP counters count false to true rung transitions. Each false to true transition generates one count on the CTU counter.  When the rung is true, the Count UP (CU) bit is set to a ‘1’. When the rung is false, the Count UP (CU) is reset to a ‘0’.  When the ACC  PRE, the Done (DN) bit is set to a ‘1’. An RES instruction is required to reset the accumulator to zero. Rung CU OV DN ACC 0 0 1 0 0 2 0 0 500 0 1 1000 0 1 1050 0 1 Max+ 1 1 Min-
  • 15. Accessing Counter Data  The ‘dot’ notation is used to access the data of a counter structure.  To access the status bits of the cartonCount:  The Done (DN) bit would be the, counter tag, ‘dot’, the bit designator  cartonCount.DN  The other status bits are accessed in a similar manner:  cartonCount.CU for the Counter Count UP Bit  cartonCount.OV for the Counter Overflow Bit
  • 16. Accessing Counter Data  The ‘dot’ notation is used to access the data of a counter structure.  To access the value of the preset or the accumulator words:  cartonCount.PRE for the Preset value  cartonCount.ACC for the Accumulator value  All words can also be referenced to bit level, therefore:  cartonCount.ACC.5 would be bit 5 of the Accumulator word of the cartonCount counter.  cartonCount.PRE.12 would be bit 12 of the Preset word of the cartonCount counter.
  • 18. ControlLogix CTD  ControlLogix CTD counter has three parameters. Counter tag name: Ex. bottleExiting Preset – Number of events to count before an output occurs Accumulator – The current number of counts on the counter
  • 19. ControlLogix Counter Parameters  Counter  The tag name of the counter. Example: bottleExiting. The tag is created as a Counter Data Type.  Preset Value (PRE)  The Preset value is the number of counts that should occur before the counting event is done. The valid range is:  -2,147,483,648 to 2,147,483,647  Accumulator Value (ACC)  Stores the current count value of the counter. The value range is the same as the preset parameter.
  • 20. ControlLogix Counter Memory  Counters use a counter data type called a Structure. Structures are data types that consist of more than one word.  The Counter structure consists of three, 32-bit words where:  Word 0 of the structure stores the Status bits of the counter.  Word 1 of the structure stores the Preset value.  Word 2 of the structure stores the Accumulator value.
  • 21. ControlLogix Counter Memory  There are five counter status bits:  CU – Count UP (CTU only)  CD – Count DOWN (CTD only)  DN – Done (CTU & CTD)  OV – Overflow (CTU only)  UN – Underflow (CTD only) Structure members The plus (+) sign is used to drill into the structure. The minus (-) is used to collapse a structure Data types of the members of the structure.
  • 22. Counter Status Bits  Count UP (CU) (CTU only)  Sets to a logic ‘1’ when the rung containing the Count UP (CTU) counter is true, otherwise it is a logic ‘0’.  Count DOWN (CD) (CTD only)  Sets to a logic ‘1’ when the rung containing the Count DOWN (CTD) counter is true, otherwise it is a logic ‘0’.  Done (DN)  Sets to a logic ‘1’ when the Accumulator value is greater than or equal to the preset value (ACC  PRE), other wise it is a logic ‘0’.
  • 23. Counter Status Bits  Overflow (OV) (CTU only)  Used with the Count UP (CTU) counter. If the accumulator has reached a maximum positive value of +2,147,483,647 and the counter is incremented up again, the accumulator will wrap around to -2,147,483,648. When this wrap around occurs, the Overflow (OV) bit will set to a logic ‘1’. If the Done (DN) bit is set to a ‘1’ and the counter overflows, the Done (DN) bit will remain a ‘1’, even if the accumulator is less than the preset (ACC < PRE). The counter must be reset with the RES instruction to reset the Overflow (OV) bit to a logic ‘0’ and to clear the Done (DN) bit.
  • 24. Counter Status Bits  Underflow (UN) (CTD only)  Used with the Count DOWN (CTD) counter. If the accumulator has reached a minimum negative value of -2,147,483,648 and the counter is decremented down again, the accumulator will wrap around to +2,147,483,647. When this wrap around occurs, the Underflow (UN) bit will set to a logic ‘1’. If the Done (DN) bit is set to a ‘1’ and the counter underflows, the Done (DN) bit will remain a ‘1’, even if the accumulator is less than the preset (ACC < PRE). The counter must be reset with the RES instruction to reset the underflow (UN) bit to a logic ‘0’ and to clear the Done (DN) bit.
  • 25. CTD Status Bit Functionality  Count DOWN counters count false to true rung transitions. Each false to true decrements one count on the CTD counter.  When the rung is true, the Count DOWN (CD) bit is set to a ‘1’. When the rung is false, the Count DOWN (CD) is reset to a ‘0’.  When the ACC  PRE, the Done (DN) bit is set to a ‘1’. An RES instruction is required to reset the accumulator to zero. Rung CD UN DN ACC 0 1 -1 0 1 -36 0 1 -50 0 0 -51 0 0 -53 0 0 Min - 1 0 Max +
  • 26. Accessing Counter Data  The ‘dot’ notation is used to access the data of a counter structure.  To access the status bits of the bottleExiting:  The Done (DN) bit would be the counter tag, ‘dot’, the bit designator  bottleExiting.DN  The other status bits are accessed in a similar manner:  bottleExiting.CD for the Count DOWN Bit  bottleExiting.UN for the Underflow Bit
  • 27. Accessing Counter Data  The ‘dot’ notation is used to access the data of a counter structure.  To access the value of the preset or the accumulator words:  bottleExiting.PRE for the Preset value  bottleExiting.ACC for the Accumulator value  All words can also be referenced to bit level, therefore:  bottleExiting.ACC.5 would be bit 5 of the Accumulator word of the bottleExiting counter.  bottleExiting.PRE.12 would be bit 12 of the Preset word of the bottleExiting counter.
  • 30. Parts Counting  Counter totalNumOfParts counts the total number of parts coming off an assembly line for final packaging.  Each package must contain 10-parts.  When 10-parts are detected, counter numberOfParts sets bit intBoxClosSeq to initiate the box closing sequence.  Counter totalPackages counts the total number of packages filled per day.  A push button is used to restart the total part and package count to zero, daily. http://www.keyence.com/img/products/series/il_ws_sr48219_device_count.gif
  • 33. Conveyor Motor  This circuit will use a oneshot for reset and another oneshot to prevent the PLC from seeing chatter from the sensor.  Sequential task:  The VFD is used to start the conveyor motor.  Parts pass the sensor and increment a counter accumulator.  After 50-counts, the conveyor motor automatically stops and the counter accumulator is reset.  The conveyor motor can be stopped or started manually at any time without loss of accumulator counts. http://www.keyence.com/img/products/series/il_ws_sr48219_device_count.gif
  • 35. Alarm Monitor  The alarm is triggered by the closing of liquid level switch LS1.  The alarm light will flash whenever the alarm condition is triggered and has not been acknowledged, even if the alarm condition clears in the meantime.  The alarm is acknowledged by closing selector switch SS1.  The alarm light will operate in the steady mode when the alarm trigger condition exits but has been acknowledged.
  • 37. Parking Garage Counter  As a car enters the parking garage it triggers an up counter and increments the accumulator by one count.  As a car leaves the parking garage it triggers a down counter and decrements the accumulator by one count.  The up and down counters will use the same tag name. Since the counters have the same tag name, the accumulated value is the same for both counters.  Whenever the accumulator value is equal to the preset value, the counter output is energized to light the “Lot Full” sign.
  • 39. IEC Counters  The IEC 31161-3 standard specifies three counters:  Count UP – CTU  Count DOWN – CTD  Count UP/DOWN – CTUD  The functionality of the CTU and CTD are basically the same as the ControlLogix counters.  Siemens and Allen Bradley CCW use the IEC standard counters.
  • 40. IEC 31161-3 CTU  The IEC 31161-3 CTU has three inputs and two outputs:  IN – Data type BOOL ≡ Count UP (CU)  R – Data type BOOL (Reset the counter)  PV – Data type DINT ≡ Preset (PRE)  Q – Data type BOOL ≡ Done Bit (DN)  CV – Data type DINT ≡ Accumulator (ACC) Siemens counter shown
  • 41. IEC 31161-3 CTD  The IEC 31161-3 CTD has two inputs and two outputs:  CD – Data type BOOL ≡ Count DOWN (CD)  LD – Data type BOOL – Load (CV = PV when LD is True)  PV – Data type DINT ≡ Preset (PRE)  Q – Data type BOOL ≡ Done Bit (DN)  CV – Data type DINT ≡ Accumulator (ACC) Siemens counter shown
  • 42. IEC 31161-3 CTUD  The IEC 31161-3 CTD has five inputs and three outputs:  CU – Data type BOOL ≡ Count UP (CU)  CD – Data type BOOL ≡ Count DOWN (CD)  R – Data type BOOL (Reset the counter)  LD – Data type BOOL – Load (CV = PV when LD is True)  PV – Data type DINT ≡ Preset (PRE)  QU – Data type BOOL ≡ Overflow (OV) True when CV  PV  QD – Data type BOOL ≡ Underflow (UN) True when CV  PV  CV – Data type DINT ≡ Accumulator (ACC)
  • 43. IEC 31161-3 CTD Siemens counter shown
  • 44. IEC 31161-3 Counters - CCW  The Allen Bradley CCW software uses the same type of counter with the same functionality.
  • 45. IEC 31161-3 Counters - CCW  The Allen Bradley CCW software uses the same type of counters with the same functionality.
  • 46. References Dagget, R. (n.d.). 3 Options for Starting and Stopping an AC Motor. Retrieved October 28, 2016, from Bastian Solutions: https://www.bastiansolutions.com/blog/index.php/2014/03/17/3-options-for-starting-and- stopping-ac-motor/#.WBO20y0rLiw Direct Industry. (n.d). Digital Up-Down Counters. Retrieved October 2016, 2016, from Direct Industry: http://www.directindustry.com/industrial-manufacturer/digital-up-down-counter- 159777.html Direct Industry. (n.d.). Line Seike. Retrieved October 25, 2016, from Direct Industry: http://www.directindustry.com/prod/line-seiki/product-23163-633672.html Find Icons. (n.d.). Reset. Retrieved October 28, 2016, from Find Icons: http://findicons.com/search/reset Keyence America. (n.d.). An Even Wider Range of Applications. Retrieved October 28, 2016, from Keyence America: http://www.keyence.com/products/measure/laser- 1d/il/applications/index.jsp Newark element14. (n.d.). Veeder Root 0166726-006 Mechanical Counter, Ratchet Drive. Retrieved October 25, 2016, from Newark element 14: http://www.newark.com/veeder- root/0166726-006/mechanical-counter-ratchet-drive/dp/88C9906