Square Wave Generator Odd Preset Value; Figure 1-17 Square-Wave Generator (Odd Preset Value) - Siemens SIMATIC TI505 User Manual

High speed counter encoder module
Hide thumbs Also See for SIMATIC TI505:
Table of Contents

Advertisement

Square Wave
Generator Odd
Preset Value
Starts On
Pulse Input
Starts Off
Gate, Reset, or
Programming
Output

Figure 1-17 Square-Wave Generator (Odd Preset Value)

High Speed Counter Encoder Module User Manual
For an odd preset value, the preset – 1 value is loaded, and the counter
starts decrementing by two after the first clock pulse. The output turns On
when the count value is zero and would underflow, however, the counter
automatically reloads the preset + 1 value into the counter and starts
decrementing by two.
The output turns Off when the count value is zero again. The counter
automatically reloads the preset – 1 value into the counter and starts
decrementing by two.
This cycle repeats until a 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 counters 2, 3, 5, or 6. When the
gate goes 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-17, shows that for an odd
initial preset value of five, 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 (three clocks Off and two clocks On), the output goes
On for the other half of the initial count. The gate input Off enables the
counter; On inhibits the counter.
For an odd initial preset value, the output is On for ((N+1) / 2) counts and
Off for ((N–1) / 2) counts. An initial count of five results in the waveform
shown in Figure 1-17.
20
20
4
2
0
4
20
19
4
2
0
4
2
4
2
0
4
4
2
4
2
0
4
4
4
2
0
4
2
4
4
2
0
4
2
4
Product Overview
2
2
1-23

Advertisement

Table of Contents
loading

Table of Contents