CHAPTER PLC Counter Instructions 9 Objectives Use count
CHAPTER PLC Counter Instructions 9
Objectives • Use count up instructions to create PLC ladder logic diagrams. • Use count down instructions to create PLC ladder logic diagrams. • Reset counter instructions. • Connect different counter instructions and cascade counter instructions. • Use timer and counter instructions to create PLC ladder logic diagrams. Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
PLC Counter Instructions • Double-input counter • Single-input counter Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
PLC Counter Instructions (Cont. ) • Counter instruction: – Similar to the timer instruction – Displayed in block format or coil format – Single-input in block format – Allen-Bradley SLC 500 series programmable logic controller uses one input – Addresses can be C 5: 0 to C 5: 255 – Can have up to 256 instructions Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
PLC Counter Instructions (Cont. ) • Count up: – Accumulated register value increments (counts up) whenever the counter input device changes state • Count down: – Accumulated register value decrements (counts down) whenever the counter input device changes state Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
PLC Counter Instruction Registers • Preset register (C 5: 0. PRE): – Used to hold the preset counter number • Accumulated register (C 5: 0. ACC): – Holds the accumulated counter number • Status register: – Holds flag bits that are used by the PLC to keep track of the operation of counter C 5: 0 Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
PLC Counter Instruction Registers (Cont. ) • Two flag bits: – Count bit – Done bit C 5: 0/DN Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
PLC Counter Instruction Registers (Cont. ) • Overflow bit (OV) • Underflow bit (UN) • Update accumulator bit (UA): – Used with high-speed counter (HSC) instructions Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
SLC 500 Counter Instruction Registers and Status Bits Goodheart-Willcox Publisher Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
PLC Count Up Instructions • Accumulated register increments when counter input device changes state Goodheart-Willcox Publisher Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
PLC Ladder Logic Diagram Using Count Up Instruction Goodheart-Willcox Publisher Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
PLC Count Down Instructions • Accumulated register decrements whenever the counter input device changes state • Preset value for the count down usually is a negative number • Content of the accumulated register decrements from its initial value of zero to the negative preset number Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
Count Down Instruction Connected to a NO Input Goodheart-Willcox Publisher Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
PLC Count Instructions Comparison • Count down instruction: • Count up instruction: – Done bit (C 5: 0/DN) resets to zero – Done coil de-energizes when the content of the accumulated register decrements to the preset number – Done bit (C 5: 0/DN) is enabled – Done coil energizes when the content of the accumulated register is equal to the content of the preset register Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
Connecting PLC Counter Instructions • In some manufacturing operations: – Content of an entire section of a conveyor needs to be known at one time – Place two proximity sensors on the conveyor • One sensor connected to count up instruction • One sensor connected to count down instruction Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
Connecting PLC Counter Instructions (Cont. ) • Conveyor and proximity sensors and how counting is accomplished Goodheart-Willcox Publisher Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
Connecting PLC Counter Instructions (Cont. ) • Infeed proximity switch: – Connected to the count up instruction • Outfeed proximity switch: – Connected to the count down instruction Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
Cascading Counters • In some industrial applications: – Counters are cascaded so that one counter increments or decrements when another counter is done – Used mainly in material handling and process control environments Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
PLC Ladder Logic Diagram Using Cascading Counters Goodheart-Willcox Publisher Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
PLC Ladder Logic Diagram with Counters and Timers Goodheart-Willcox Publisher Copyright Goodheart-Willcox Co. , Inc. May not be posted to a publicly accessible website.
- Slides: 21