1.2 TIMERS, COUNTERS, FLIP-FLOPS, LATCHES
• There are some devices, and concepts that are Temporal. This means that they keep track of events over time, as opposed to conditional logic that decides based on instantaneous conditions.
• Controls that have states, or time dependence will require temporal controls (also known as sequential)
• Some devices that are temporal are
Flip-Flops - these can be latched on or off.
Latches - Will stay on until reset (Similar to flip-flops)
Counters - Keeps a count of events
Timers - Allows inputs and outputs to be delayed, or prolonged be a known amount.
• Assuming that the PLC is much faster than the fastest event (i.e. no aliasing), then we can approximate the timing diagram above with a simpler form.
• As an example consider the ladder logic for a SLC-150,
• In most PLCs these will keep their last state even when the PLC is turned off, and back on.
• Write a short ladder logic program that will,
• There are many type, but one of the best known is the SR (Set-Reset) Flip-Flop.
• We use timers to do some or all of,
- Delay turning on
- Delay turning off
- Accumulate time passed
• When using timers (especially retentive) we must reset values when done. The (RES) instruction does this.
• The timers also have timer timing bits that indicate when the accumulator value is changing.
• Consider the example below, Write out the values for the accumulator, enable, timer timing and the done bits.
• Repeat the last example for the timer below.
• Consider the example of the SLC timers given below,
• As an example,
• When more than one event should happen in a sequence, timers can be cascaded. This means that the end of the first timer starts the next.
• As an example,
• Count up/count down counters will track input events.
• Count down counters are similar but can be used for convenience.
• Consider the example below for a SLC-150,
• Write a simple program that will,