21

Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Embed Size (px)

Citation preview

Page 1: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions
Page 2: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Chapter

9PLC Counter Instructions

Page 3: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

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.

Page 4: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

PLC Counter Instructions

• Double-input counter• Single-input counter

Page 5: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

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 C5:0 to C5:255.– Can have up to 256 instructions.

Page 6: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

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.

Page 7: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

PLC Counter Instruction Registers

• Preset register (C5:0.PRE):– Used to hold the preset counter number.

• Accumulated register (C5: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 C5:0.

Page 8: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

PLC Counter Instruction Registers (Cont.)

• Two flag bits:– Count bit.– Done bit C5:0/DN.

Page 9: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

PLC Counter Instruction Registers (Cont.)

• Overflow bit (OV).• Underflow bit (UN).• Update accumulator bit (UA):

– Used with high-speed counter (HSC) instructions.

Page 10: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

SLC 500 Counter Instruction Registers and Status Bits

Page 11: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

PLC Count Up Instructions

• Accumulated register increments when counter input device changes state.

Page 12: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

PLC Ladder Logic Diagram Using Count Up Instruction

Page 13: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

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.

Page 14: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

Count Down Instruction Connected to a NO Input

Page 15: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

PLC Count Instructions Comparison

• Count down instruction:– Done bit

(C5:0/DN) resets to zero.

– Done coil de-energizes when the content of the accumulated register decrements to the preset number.

• Count up instruction:– Done bit

(C5:0/DN) is enabled.

– Done coil energizes when the content of the accumulated register is equal to the content of the preset register.

Page 16: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

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.

Page 17: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

Connecting PLC Counter Instructions (Cont.)

• Conveyor and proximity sensors and how counting is accomplished.

Page 18: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

Connecting PLC Counter Instructions (Cont.)

• Infeed proximity switch:– Connected to the count up instruction.

• Outfeed proximity switch:– Connected to the count down instruction.

Page 19: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

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.

Page 20: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

PLC Ladder Logic Diagram Using Cascading Counters

Page 21: Chapter 9 PLC Counter Instructions Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc. Objectives Use count up instructions

Permission granted to reproduce for educational use only.© Goodheart-Willcox Co., Inc.

PLC Ladder Logic Diagram with Counters and Timers