As known about the S counters that the max allowed number to count is 999.
Write a PLC program to count more than 999 counts for one counter.
Note: the best practice to learn the PLC programming is to start writing the PLC program, take your time before you review the answer.
I0.0: count up
I0.1: preset value
There is a counter C0 and there is a count up contact I0.0, whenever a positive edge detected from the count up bit the counter value MW0 is increased by one.
A preset value is loaded the PV of the counter to ease the simulation process, where when the preset contact I0.1 is pressed for one time the counter value is loaded by 997.
Whenever the counter reaches 999 counts 2 things happen.
The reset memory bit M10.0 is energized and resets the counter to zero.
Then a value of 1 is added to the MW2 so that to count the number of each time the counter reaches the maximum counts 999.
Multiply MW2 by 999 so that every time the counter reaches the maximum a 999 counts is added to MW4.
For example if the counter reached the maximum counts twice then the counts value in MW4 is 1998.
Add the MW4 to the current counts value of the counter gives the real counter counts calculated so far.
Author: Karim Ali Anwar
If you liked this article, then please subscribe to our YouTube Channel for PLC and SCADA video tutorials.
You can also follow us on Facebook and Twitter to receive daily updates.
Read Next:
The conveyor sorting machine is widely used in the packing industries using the PLC program…
Learn the example of flip-flop PLC program for lamps application using the ladder logic to…
In this article, you will learn the STAR DELTA programming using PLC controller to start…
Lube oil consoles of rotary equipment packages in industrial process plants are usually equipped with…
Rotating equipment packages such as pumps, compressors, turbines need the lube oil consoles for their…
This article explains how to blink lights in ladder logic with a detailed explanation video…