UNIT 58 Programmable Logic Controllers 543
INTERNAL RELAYS
The actual logic of the control circuit is performed
by internal relays. An internal relay is an imagi-
nary device that exists only in the logic of the com-
puter. It can have any number of contacts from
one to several hundred, and the contacts can be
programmed normally open or normally closed.
Internal relays are programmed into the logic of the
PLC by assigning them a certain number. Manu-
facturers provide a chart that lists which numbers
can be used to program inputs and outputs, internal
relay coils, timers, counters, and so on. When a coil
is entered at the end of a line of logic and is given
a number that corresponds to an internal relay, it
will act like a physical relay. Any contacts given
the same number as that relay will be controlled by
that relay.
TIMERS AND COUNTERS
Timers and counters are internal relays also. There
is no physical timer or counter in the PLC. They
are programmed into the logic in the same manner
as any other internal relay, by assigning them a
number that corresponds to a timer or counter. The
difference is that the time delay or number of counts
must be programmed when they are inserted into
the program. The number of counts for a counter are
entered using numbers on the keys on the load termi-
nal. Timers are generally programmed in 0.1-second
intervals. Some manufacturers provide a decimal key
and others do not. If a decimal key is not provided,
the time delay is entered as 0.1-second intervals.
If a delay of 10 seconds is desired, for example, the
number 100 would be entered. One hundred tenths
of a second equals 10 seconds.
OFF-DELAY CIRCUIT
Some programmable logic controllers permit a timer
to be programmed as on or off delay, but others
permit only on-delay timers to be programmed.
When a PLC permits only on-delay timers to be
programmed, a simple circuit can be used to per-
mit an on-delay timer to perform the function of
an off-delay timer, Figure 58–17. To understand
the action of the circuit, recall the operation of an
off-delay timer. When the timer coil is energized
the timed contacts change position immediately.
When the coil is deenergized the contacts remain in
their energized state for some period of time before
returning to their normal state. In the circuit shown
in Figure 58–17 it is assumed that contact 400 con-
trols the action of the timer. Coil 400 is an internal
relay coil located somewhere in the circuit. Coil 12
is an output and controls some external device. Coil
TO-1 is an on-delay timer set for 100 tenths of a sec-
ond. When coil 400 is energized, both 400 contacts
change position. The normally open 400 contact
closes and provides a current path to coil 12. The
normally closed 400 contact opens and prevents a
circuit from being completed to coil TO-1 when coil
12 energizes. Note that coil 12 turned on imme-
diately when contact 400 closed. When coil 400
is deenergized, both 400 contacts return to their
normal position. A current path is maintained to
coil 12 by the now closed 12 contact in parallel
400
12
TO-1
12
400
TO-1
12
00100
Figure 58–17
Off-delay timer circuit. (Source: Delmar/Cengage Learning)