The counters of Siemens S7-200plc have a total of 255 counters (excluding high-speed counters). The form of counting can be divided into three categories: "up counting", "down counting" and "adding and subtracting counting".
(1) Counting up (CTU)
The up count is a counting method of adding up by counting the rising edge of the count input signal. The counter increments from 0 to “1†every time the rising edge of the count input signal occurs. When the count reaches the set value (PV), the output contact of the counter is turned on.
Count reaches the set value. If the count signal continues to be input, the count value still increases and the output contact remains on.
The counter has a clear signal (R) input. When the clear signal is "1", the current count value is cleared to "0", the set value is written, and the output contact is forcibly turned off.
(2) Down counting (CTD)
The down count is a counting method of subtracting the count by counting the rising edge of the count input signal. Each time the rising edge of the count input signal occurs, the counter is decremented by “1†from the set value. When the current count value is reduced to “0â€, the output contact of the counter is turned on.
After the count value is "0", if the count signal continues to be input, the count value remains "0" and the output contact remains on.
The counter has a clear signal (R) input. When the clear signal is "1", the set value is written and used as the current count value, and the output contact is forcibly turned off.
(3) Addition and subtraction count (CTUD)
The addition and subtraction count has two input terminals of up counting and down counting, and the addition and subtraction counting are performed by acquiring the rising edge of the corresponding counting input signal.
The essence of the up-and-down count is the same as the up-count. Whenever the rising edge of the count input signal occurs, the counter starts from 0 and adds "1". When the count reaches the set value (PV), the output contact of the counter is turned on. Count reaches the set value. If the count signal continues to be input, the count value still increases and the output contact remains on. When the current value is added to the maximum value of 32767, if the up-counting signal is input again, the current value becomes -32768, and then the counting is continued.
At the same time, the down-counting input signal also works. For each rising edge of the down-counting input, the counter is decremented by "1" from the current value. After the current value is reduced to the minimum value of -32768, if the down count signal is input again, the current value becomes +32767, and then the countdown is continued.
The counter has a clear signal (R) input. When the clear signal is “1â€, the current count value is cleared to “0â€, the set value is written, and the output contact is forcibly turned off.
Adapter Ring,Ring Camera Adapter,Lens Adapter,Camera Adapter
Shaoxing Shangyu Kenuo Photographic Equipment Factory , https://www.kernelphoto.com