Up- and Down-Counting - Programmable Logic controllers

It is possible to program up- and down-counters together. Up-down counters are available as single entities; see Figure for the IEC symbol. Consider the task of counting products as they enter a conveyor line and as they leave it, or perhaps cars as they enter a multistorage parking lot and as they leave it. An output is to be triggered if the number of items/cars entering is some number greater than the number leaving, that is, the number in the parking lot has reached a “saturation” value. The output might be to illuminate a “No empty spaces” sign. Suppose we use the up-counter for items entering and the down counter for items leaving. Figure shows the basic form a ladder program for such an application can take. When an item enters, it gives a pulse on input In 1. This increases the count by 1. Thus each item entering increases the accumulated count by 1. When an item leaves, it gives an input to In 2. This reduces the number by 1. Thus each item leaving reduces the accumulated count by 1. When the accumulated value reaches the preset value, the output Out 1 is switched on. Figure shows how the preceding system might appear for a Siemens PLC and the associated program instruction list. CU is the count up input and CD the count down. R is the reset. The set accumulator value is loaded via F0.0, this being an internal relay.

Figure shows the implementation of this program with an Allen-Bradley program and an up- and down-counter.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Programmable Logic controllers Topics