Page 192 - Programmable Logic Controllers, Fifth Edition - Mobile version
P. 192
Inputs
Pressure Ladder logic program Outputs
L1 Internal L2
switch Reset B3:0/0
Pressure
switch Set
Internal
B3:0/0
Reset Internal
B3:0/0 Set Trip
Internal
B3:0/0 Trip
Internal
B3:0/0 Seconds
RTO
RETENTIVE TIMER ON EN
Timer T4:0 DN
Time base 1.0
Preset 60
Accumulated 0
T4:0/DN Minutes
CTU
COUNT-UP COUNTER CU
Counter C5:0 DN
Preset 60
Accumulated 0
C5:0/DN CTU Hours
COUNT-UP COUNTER CU
Counter C5:1 DN
Preset 24
Accumulated 0
T4:0/DN T4:0
RES
C5:0/DN C5:0
RES
C5:1/DN C5:1
RES
Figure 8-30 Monitoring the time of an event.
8.5 Incremental Encoder-Counter The number of square waves obtained from the output of
Applications the encoder can be made to correspond to the mechanical
movement required. For example, to divide a shaft revolution
Incremental encoders are used to track motion. They into 100 parts, an encoder could be selected to supply 100
provide a specific number of equally spaced pulses square wave-cycles per revolution. By using a counter to count
per revolution or per inch or millimeter of linear mo- those cycles, we could tell how far the shaft had rotated.
tion. Incremental encoders output pulses each time and Figure 8-32 illustrates an example of cutting objects to
only when the shaft is turned. The incremental optical a specified length. The object is advanced for a specified
encoder shown in Figure 8-31creates a series of square distance and measured by encoder pulses to determine the
waves as its shaft is rotated. The encoder disk interrupts correct length for cutting.
the light as the encoder shaft is rotated to produce the Figure 8-33 shows a counter program used for length
square wave output waveform. measurement. This system accumulates the total length
Programming Counters Chapter 8 173
pet73842_ch08_156-183.indd 173 03/11/15 3:58 PM