Counters Introduction to PLC DMT 3533 Introduction Counters

  • Slides: 11
Download presentation
Counters Introduction to PLC DMT 353/3

Counters Introduction to PLC DMT 353/3

Introduction • Counters used in PLCs serve the same function as mechanical counters. •

Introduction • Counters used in PLCs serve the same function as mechanical counters. • Counters compare an accumulated value to a preset value to control circuit functions. • Control applications that commonly use counters include the following: - Count to a preset value and cause an event to occur - Cause an event to occur until the count reaches a preset value

Industrial Application • A bottling machine, for example, may use a counter to count

Industrial Application • A bottling machine, for example, may use a counter to count bottles into groups of six for packaging

Basic Operation of Counter • Counters are represented by boxes in ladder logic. •

Basic Operation of Counter • Counters are represented by boxes in ladder logic. • Counters increment/decrement one count each time the input transitions from off (logic 0) to on (logic 1). • The counters are reset when a RESET instruction is executed CNT XXXX # XXXX

OMRON Counter • There are 256 counters in the CPM 1 A, numbered CNT

OMRON Counter • There are 256 counters in the CPM 1 A, numbered CNT 000 through CNT 255. • The same number cannot be assigned to more than one counter or timer. • For example, if an up counter is assigned number 45, a timer cannot also be assigned number 45. • The maximum count value of a counter is 9999

Counter Example • A counter might be used to keep track of the number

Counter Example • A counter might be used to keep track of the number of vehicles in a parking lot. • As vehicles enter the lot through an entrance gate, the counter counts up. • When the lot is full a sign at the entrance gate turns on indicating the lot is full

Counter Example • In this ladder diagram, we wait for the sensor 0001 to

Counter Example • In this ladder diagram, we wait for the sensor 0001 to turn on. • Each pulse transition change form logic 0 to 1, will count as 1 • When 100 pulse transition has achieved, the CNT 000 contact close and output 1000 turns on. • When input 0001 turns on, the counter CNT 000 will reset back to 0 causing its contact to turn off (open), thereby making output 1000 turn back off. 0000 CNT 0001 #0100 CNT 000 1000

How it works? • • Count input Reset input Counter number (000 -255) Set

How it works? • • Count input Reset input Counter number (000 -255) Set value (0000 -9999)

Control Circuit for Packaging Machine • The control circuit is used to detect and

Control Circuit for Packaging Machine • The control circuit is used to detect and count the number of products being carried on an assembly line. When it counts five products, the circuit energizes a solenoid. The solenoid is energized for a period of 2 s is then shunt off causing it to retract.

ANY QUESTIONS

ANY QUESTIONS