PLC internal counters (c)

Internal counter for the PLC‘s internal image register (X,Y,M,S) provides the signal count, count pulse for the duration of the ON or OFF, should be greater than the PLC scanning cycle, the response rate is typically less than dozens of cycles per second.
1. 16-bit and counter
16-bit and a counter value for l~32767. Figure 313 shows the work process of adding counters, X10 normally open contact connected in this image, C0 is reset, it corresponds to the storage unit is set to 0, it‘s normally open disconnect, connect normally closed contact, while the counting current value is reset to 0. X11 is used to provide a count of the input signal, when the reset of the counter input circuit, counting input circuits from open to close (that is, count the rising edge of the pulse), the counter‘s current value plus 1. 5 after the pulse, the C0 set value is equal to the current value of 5, which correspond to the contents of the storage unit is set to 1, the normally open contacts connected normally closed contacts disconnect. To count the pulse current value unchanged until the reset input circuit, the current value of the counter is reset to 0. Can also be specified through the data register to set the value of the counter.
With reserve battery of counter/latch function can maintain its state information when the power again after the transmission to resume working immediately when you press the power off State.
2. 32-bit bidirectional counter
C200~C234 32-bit bidirectional counter value is2 147 483 648~+2 147 483 647, plus/minus count set by the special auxiliary relays M8200~M8234, when the corresponding special auxiliary relay ON, count reduction, whereas for plus counts.
32-bit counter value in addition to the set by the constant k, but can also be set by specifying the data register, 32-bit value stored in two data registers connected to the component number. If you specify a D0, the settings stored in the D1 and D0. C200 in Figure 314 set the value to 5, and count, if the current value of the counter by 45, the output contact of the counter ON, current value of 5 o’clock, output contact is still ON. Current value by 54 o’clock, output contact OFF, current value of 4 o’clock, the output contacts remain OFF.
The current value of the counter at the time of maximum of 2 147 483 647 plus 1 will become minimum2 147 483 648, similarly, reduced current value2 147 483 648 1 o’clock, will change to a maximum value of 2 147 483 647, the counter is called a ring counters.
Figure 3 – 14 in the reset entered X13 of often open touch points connected Shi, C200 was reset, its often open touch points disconnect, often closed touch points connected, current value was reset for if using battery reserve/lock save counter, in power interrupted Shi, counter stop count, and keep count current value not variable, power again connected Hou in current value of based Shang continues to count, so battery reserve/lock save counter can cumulative count.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.