250
SECTION
2
Components
and Systems
Industrial Text & Video Company 1-800-752-8398
www.industrialtext.com
CHAPTER
8
Special Function I/O and
Serial Communication Interfacing
EXAMPLE 8-4
A PLC system, which has a scan time of approximately 15 msec, uses
a standard nonintelligent ASCII module. This ASCII interface reads
and writes information to and from a remote alphanumeric keyboard/
display user interface. What is the maximum baud rate (bits per
second) that can be used for proper transmission?
S
OLUTION
A scan time of 15 msec implies that, for proper transmission, only one
character can be received every 15 msec. Each ASCII character has
is, the module interrupts the main CPU every time it receives a character
from the peripheral, and the CPU accesses the module every time it needs to
send a message to the peripheral. This communication speed is generally very
slow, so for a character to be read, the scan time must be faster than the time
required to accept one character. For example, if the scan time is 20 msec and
the baud rate (i.e., the number of binary bits transmitted per second) is 300 (30
characters per second—1 ASCII character = 10 bits), a character will be
received every 33.3 msec (1 second ÷ 30 characters = 1 character every 33.3
msec). Conversely, if the baud rate is 1200 (120 characters per second), more
than one character will be transmitted from the peripheral per scan (one
character every 8.33 msec). In this case, several characters will be lost since
the PLC processor scans only once every 20 msec. This type of
nonintelligent module, which does not have a microprocessor, is used in
applications that require the communication of just a few characters, which
are output at a relatively slow speed.
In an intelligent, or smart, ASCII interface, transmission between the
peripheral and the module still occurs on an interrupt basis but at a faster
transmission speed. An on-board microprocessor dedicated to performing
I/O communication makes this possible. The on-board microprocessor con-
tains its own RAM memory, which can store blocks of data that are to be
transmitted. When the module receives the input data from the peripheral, the
module transfers it in blocks to the PLC memory through a data transfer
instruction at the I/O bus speed. With this type of interface, all of the initial
communication parameters, such as number of stop bits, parity (even or odd)
or nonparity, and baud rate, can be selected using either hardware (i.e., rocker
switches or jumpers) or control software. This method significantly speeds up
the communication process and increases data throughput. Applications
requiring lengthy reports or fast information exchange with alphanumeric
devices generally use this type of smart module.