+ All Categories
Home > Documents > MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

Date post: 13-Jan-2016
Category:
Upload: noel-daniels
View: 249 times
Download: 1 times
Share this document with a friend
63
MECH 1500 Chapter 8
Transcript
Page 1: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Chapter 8

Page 2: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Counter Instructions

8.1

Page 3: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Programmed counters serve the same function as mechanical counters.

Every time the actuating lever is moved over, the counter adds one number.

Resetting to zero is done with a pushbutton located on the side of the unit.

Page 4: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Electronic counters can count up, count down, or be combined to count up and down.

Although the majority of counters used in industryare up-counters, numerous applications require theimplementation of down-counters or of combination up/down-counters.

Page 5: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

All PLC manufacturers offer some form of counter instruction.

One common counter application is keeping track of the number of items moving past a given point.

Page 6: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

PLC counter instructions are similar to timers except that they do not operate on an internal clock but are dependent on external or program sources for counting

Generic coil-formatted up-counter instruction.

Page 7: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

The counter reset instruction must be used in conjunction with the counter instruction.

Up-counters are always reset to zero.

The counter resetcoil is given the same address as the counter that it is to reset.

Page 8: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Generic block-formatted counter.

All PLC counters operate, or count, on the leading edge or off-to-on transition of the input condition.

Page 9: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

PLC counters can be programmed to count up to a preset value or to count down to a preset value.

The up-counter is incremented by 1 each time the rung containing the counter is energized.

The down-counter decrements by 1 each time the rung containing the counter is energized.

Page 10: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Up-Counter

8.2

Page 11: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

The up-counter is used to count false-to-true transitions of an input instruction and then trigger an event after a required number of counts or transitions.

The up-counter output instruction will increment its accumulated value by 1 each time the counted event occurs.

Page 12: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

SLC 500 Up-Counter program

Page 13: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

SLC 500 Up-Counter timing diagram

Page 14: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Simulated Up-Counter program

Page 15: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

The Allen-Bradley SLC 500 counter file is file 5.

Page 16: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Count-Up (CU) enable bit - is true (1) whenever the count-up counter instruction is true.

Count-Down (CD) enable bit - is true (1) whenever the count-down counter instruction is true.

Done (DN) bit - is true (1) whenever the accumulated value is equal to or greater than the preset value of the counter, for either the count-up or the count-down counter.

Page 17: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Overflow (OV) bit is - true (1) wheneverthe counter counts past its maximum value, 32,767. On the next count, the counter willwrap around to -32,768 and will continue counting to 0.

Underflow (UN) bit is - true when the counter counts below -32,768. The counterwill wrap around to +132,767 and continue counting down toward 0.

Page 18: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Update Accumulator (UA) bit- is used in conjunction with an externalhigh-speed counter.

The preset value (PRE) word - specifies the value that the counter must count to before it changes the state of thedone bit.

The accumulated value (ACC) word - is the current countbased on the number of times the rung goes from falseto true.

Page 19: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

SLC 500 up-counter instruction.

Page 20: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Timer/counter menu from the RSLogix toolbar.

CTU (Count-Up) Increments the accumulated value at each false-to-true transition and retains the accumulated value when an off/on power cycle occurs.CTD (Count-Down) Decrements the accumulated value at each false-to-true transition and retains the accumulated value when an on/off power cycleoccurs.HSC (High-Speed Counter) Counts high-speed pulses from a high-speed input.

Page 21: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

PLC counter program used to stop a motor from running after 10 operations.

Page 22: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Simulated counter program used to stop a motor from running after 10 operations.

Page 23: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Can-counting program that uses three up-counters.

Page 24: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Simulated can-counting program.

Page 25: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

A one-shot, or transitional, contact is often used to automatically clear or reset a counter.

The one-shot can be triggered from a momentary signalor from a signal that comes on and stays on for some time.

It stays on for one scan only and then goes off.

It stays off until the trigger goes off, and then comes on again.

Page 26: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Some PLCs provide transitional contacts or one-shot instructions.

The off-to-on transitional contact provides a one-shot pulse when the trigger signal makes a off-to-on transition.

The on-to-off transitional contact provides a one-shot pulse when the trigger signal makes a on-to-off transition.

Page 27: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

The Allen-Bradley SLC 500 one-shot rising (OSR) instruction is an input instruction that triggers an event to occur one time.

Page 28: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Up-counter with a programmed one-shot rising (OSR) off-to-on transitional contact instruction.

Page 29: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Simulated up-counter with a programmed one-shot rising (OSR) contact instruction.

Page 30: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

OSR instruction used to freeze rapidly displayed LED values.

Closing the momentary pushbutton PB (I:1/0) willfreeze and display the value at that point in time.

Page 31: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Simulation of OSR instruction used to freeze rapidly displayed LED values.

Page 32: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Alarm monitor program.

Page 33: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Simulated alarm monitor program.

Page 34: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Down-Counter

8.3

Page 35: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

A down-counter will count down or decrement by 1 each time the counted event occurs.

Normally the down-counter is used in conjunction with the up-counter to form an up/down-counter.

Generic up/down counter program.

Page 36: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Up/down counter program counting diagram.

Page 37: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Parking garage counter program.

Page 38: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Simulated parking garage counter program.

Page 39: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Count-down counter instruction used as part of the SLC 500 controller instruction set.

The information to be entered into the instruction is the same as for the count-up instruction.

Page 40: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Up/down-counter program.

Page 41: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Simulated up/down-counter program.

Page 42: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Program that provides continuous monitoring of items in process.

The accumulated count of the counter continuously indicates the number of in-process parts.

Page 43: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Program that provides continuous monitoring of items in process.

Page 44: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Simulated program that provides continuous monitoring of items in process.

Page 45: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Cascading Counters

8.4

Page 46: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Depending on the application, it may be necessary to count events that exceed the maximum number allowable per counter instruction. One way of accomplishing this count is by interconnecting, or cascading, two counters.

Page 47: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Counting beyond the maximum count program.

Page 48: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Simulated counting beyond the maximum count program.

Page 49: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Cascading counters for extremely large counts.

Page 50: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Simulated program for extremely large counts.

Page 51: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

24-hour clock program.

Page 52: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Simulated 24-hour clock program.

Page 53: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Monitoring the time of an event program.

Page 54: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Simulated time of an eventprogram.

Page 55: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Incremental Encoder-Counter Applications

8.5

Page 56: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

The incremental optical encoder creates a series of square waves as its shaft is rotated.

The encoder disk interrupts the light as the encoder shaft is rotated to produce the square wave output waveform.

Page 57: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Cutting objects to a specified length.

The object is advanced for a specified distance and measured by encoder pulses to determine the correct length for cutting.

Page 58: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Counter program used for length measurement.

Page 59: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Combining Counterand Timer Functions

8.6

Page 60: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Automatic stacking program

Page 61: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Motor lock-out program

Page 62: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Product flow rate program.

Page 63: MECH 1500 Chapter 8. MECH 1500 Counter Instructions 8.1.

MECH 1500

Timer driving a counter to produce an extremely long time-delay period.


Recommended