Each time the Siemens PLC's up count input switches from off to on, the up count (CTU) counts up from the current value of the counter. The counter is reset when the reset input turns on or a reset instruction is executed. The counter stops when the maximum value (32,767) is reached.
The up/down counter (CTUD) counts up each time the up count input performs an off-to-on transition, and each time the down count input performs an off-to-on transition (32,767), the next rising edge of the up count input causes the current count to reach the minimum value (32,768). Similarly, when the minimum value (-32,768) is reached, the next rising edge of the down count input causes the current count to reach the maximum value (32,767).
The up and up/down counters have a current value that holds the current count. The counters also have a preset value (PV) that is combined with the preset value each time the counter instruction is executed when the C bit is on. Otherwise, the C bit is off.
The down counter (CTD) counts down from the current value of the counter each time the count down input performs an off-to-on transition. When the load input turns on, the counter resets the counter bit and loads the preset value into the current value. When zero is reached, the counter stops and the counter bit (C bit) turns on.
When you use the Siemens PLC reset command to reset a counter, the counter bits are reset and the counter current value is set to zero. Use the counter number to reference the current value and C bit of the counter.
Notes:
Because each counter has a current value, do not assign the same number to more than one counter. (Up counters, up/down counters, and down counters access the same current value.)
Previous article:PLC pulse frequency conversion
Next article:Analysis of software or hardware causes of PLC crash
- Popular Resources
- Popular amplifiers
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- Advances in radar technology and the development of in-cockpit sensing technology
- Circuit-level electrostatic protection design techniques and ESD protection methods
- Example verification and serial printing
- From cart-mounted to portable: Ultrasound smart probes could transform healthcare delivery
- [RISC-V MCU CH32V103 Review] - 9: Motor Control Board
- Raspberry Pi Windows IoT Development (Part 2) USB Camera
- Detailed explanation of ZigBee networking principle
- A brief introduction to FPGA
- What are the difficulties and common methods of battery SOC estimation?
- VC++ In-depth Explanation (Revised Edition)