8. LATCHES, TIMERS, COUNTERS AND MORE

Topics:

• Latches, timers, counters and MCRs

• Design examples

• Internal memory locations are available, and act like outputs

Objectives:

• Understand latches, timers, counters and MCRs.

• To be able to select simple internal memory bits.

More complex systems cannot be controlled with combinatorial logic alone. The main reason for this is that we cannot, or choose not to add sensors to detect all conditions. In these cases we can use events to estimate the condition of the system. Typical events used by a PLC include;

first scan of the PLC - indicating the PLC has just been turned on

time since an input turned on/off - a delay

count of events - to wait until set number of events have occurred

latch on or unlatch - to lock something on or turn it off

The common theme for all of these events is that they are based upon one of two questions "How many?" or "How long?". An example of an event based device is shown in Figure 8.1 An Event Driven Device. The input to the device is a push button. When the push button is pushed the input to the device turns on. If the push button is then released and the device turns off, it is a logical device. If when the push button is release the device stays on, is will be one type of event based device. To reiterate, the device is event based if it can respond to one or more things that have happened before. If the device responds only one way to the immediate set of inputs, it is logical.

Figure 8.1 An Event Driven Device