![Siemens SIMATIC TI505 User Manual Download Page 38](http://html.mh-extra.com/html/siemens/simatic-ti505/simatic-ti505_user-manual_374681038.webp)
Product Overview
1-22
High Speed Counter Encoder Module User Manual
Counting with 16-Bit Counters (continued)
The square-wave generator generates an active output for one-half of the
preset number of clocks. The length of the down count cycle is the preset
number of clocks.
For an even preset count, the preset is loaded, the output is Off, and the
counter starts decrementing by two after the first clock pulse. The output
turns On when the count value is zero. The counter automatically reloads
the preset value into the counter and starts decrementing by two again.
The output turns Off when the count value is zero again. The counter
automatically reloads the preset value into the counter and starts
decrementing by two.
This cycle repeats until an Off Gate control signal pauses the counting. The
output is On and Off for (preset value/2) clocks.
This cycle repeats until an high gate control signal pauses the counting. A
gate can be an external input or the PLC can set the Reset Counter flags,
WY19.03, .04, .07, or .08 corresponding to counter 2, 3, 5, or 6. When the
gate is On, the counting pauses and the outputs turn Off. When the gate is
released (turns Off) or the Reset Counter flag is cleared, the counter is
loaded with the preset value, and counting resumes on the next valid clock.
The square-wave generator waveform, Figure 1-16, shows that for an even
initial preset value of four, the output is Off and remains Off until the
counter decrements to one-half the initial value. When the counter counts
the preset value down (two clocks On and two clocks Off), the output goes
On for the other half of the initial count. The gate input Off enables the
counter; On inhibits the counter.
Pulse Input
Starts Off
Gate, Reset, or
Programming
Output
Starts On
20
4
2
4
2
4
2
4
4
4
20
4
2
4
2
4
20
4
2
4
2
4
2
4
4
4
19
4
2
4
2
4
Figure 1-16
Square-Wave Generator (Even Preset Value)
Square-Wave
Generator Even
Preset Value