11-02-2013, 03:58 PM
PC Interfacing and Data Acquisition
PC Interfacing and Data Acquisition.pdf (Size: 1.9 MB / Downloads: 20)
The PC as a platform for data
acquisition
The field of data acquisition and control (DA&C) encompasses a
very wide range of activities. At its simplest level, it involves reading
electrical signals into a computer from some form of sensor. These
signals may represent the state of a physical process, such as the
position and orientation of machine tools, the temperature of a
furnace or the size and shape of a manufactured component. The
acquired data may have to be stored, printed or displayed. Often
the data have to be analysed or processed in some way in order
to generate further signals for controlling external equipment or
for interfacing to other computers. This may involve manipulating
only static readings, but it is also frequently necessary to deal with
time-varying signals as well.
Some systems may require data to be gathered slowly, over time
spans of many days or weeks. Other will necessitate short bursts of
very high speed data acquisition – perhaps at rates of up to several
thousand readings per second. The dynamic nature of many DA&C
applications is a fundamental consideration which we will repeatedly
return to in this book.
The IBM PC is, unfortunately, not an ideal platform for DA&C.
There are a number of problems associated with using it in situations
which demand guaranteed response times. However, it is used widely
for laboratory automation, industrial monitoring and control, as well
as in a variety of other time-critical applications.Sowhyis it sopopular?
The most obvious reason is, of course, that the proliferation of
office desktop systems, running word processing, accounting, DTP,
graphics, CAD and many other types of software, has led IBM and
numerous independent PC-clone manufacturers to develop ever
more powerful and inexpensive computer systems. The technology
is now well developed and stable in most respects. For the same
reason, an enormous software base now exists for this platform. This
includes all manner of scientific, statistical analysis, mathematical and
4 PC interfacing and data acquisition
engineering packages that may be used to analyse acquired data. A
wide range of software development tools, libraries, data-acquisition
hardware and technical documentation is also available. Perhaps
the most important reason for using the PC for data acquisition
and control is that there is now a large and expanding pool of
programmers, engineers and scientists who are familiar with the PC.
Indeed it is quite likely that many of these personnel will have learnt
how to program on an IBM PC or PC clone.
This book sets out to present some of the basic concepts of DA&C
programming from a practical perspective and to illustrate how
elements of the PC architecture can be employed in DA&C systems.
Although it contains quite detailed descriptions of certain elements
of the PC’s hardware and interface adaptors, the text concentrates
on the software techniques that are required to make effective use
of the PC for DA&C. The first two chapters begin by discussing the
structure of DA&C systems and attempt to assess how well the PC
and its operating systems meet the stringent requirements of data
acquisition and real-time operation.
Types of PC
Since the first models of the IBM Personal Computer (PC) were
introduced in the early 1980s there have been many variants issued
by IBM and by numerous ‘clone’ manufacturers. Each new variant
has tended to introduce improved components or subsystems which
enhance speed or provide some other system capability. We will not
describe the various models of PC in detail here as most readers will
already be familiar with the basic differences between the XT, AT,
PS/2 and EISA machines. It is sufficient to note that the basic architecture
of most types of PC is very similar. The differences in performance
between systems arise from the different types of processor,
memory subsystem and expansion bus used. These are perhaps the
most important considerations although other components, such as
the disk and video subsystems, can substantially affect throughput.
The IBM PC was originally developed as a stand-alone machine
for office desktop use. While many DA&C applications can, and
do, run successfully on such systems, desktop models do not always
provide the required degree of robustness for use in harsh environments.
This has led a number of manufacturers to produce more
rugged versions of the PC. Many systems are built into rack-mounted
chassis. They may incorporate conventional motherboard designs
or they may utilize a backplane system into which a processor card,
video adaptors and disk drive controllers are inserted. Ruggedized
industrial PCs offer benefits such as sealed keyboards, positively
The PC as a platform for data acquisition 5
pressurized cooling systems, and anti-vibration shock mountings.
Both hard disks and floppy disk drives tend to be easily damaged
by dust, vibration and magnetic fields. These problems are circumvented
in some systems by substituting a solid state (i.e. EPROM or
SRAM based) disk emulation card which is generally less susceptible
to damage.
Some industrial PCs may possess interfaces for disks, serial ports,
parallel ports, and other peripheral devices on the same circuit
board. Single-board computers are often integrated into dedicated
equipment which is used, for example, in industrial or medical
monitoring applications. These embedded systems are normally
designed so as to minimize size, power consumption and cooling
requirements. In these systems, hard disks are frequently replaced by
ROM-based devices which provide storage for all software, including
the operating system. Embedded PC controllers are also used in
mobile equipment. However, there are a number of other options
when it comes to mobile computing. There are now many notebook
PCs and ruggedized portable computers on the market. These can
easily interface to external data logging or control equipment in
order to facilitate configuration or downloading of acquired data.
Ruggedized PCs, embedded PC systems, portable machines and
desktop PCs all share the same basic architecture and are generally
capable of running the same software. The structural differences
between them are largely irrelevant to the software engineer. Indeed
software can usually be developed on a desktop system and then
transferred to a ruggedized or portable PC without modification,
although minor changes may sometimes be needed when porting to
embedded systems in order to accommodate ROM-based operating
systems or to interface to specialized external buses.
The processor
Most readers of this book will already be aware of the different types of
processor and coprocessor used in the PC range. This section summarizes
the most important characteristics of each of the main classes
of processor. The text by Hummel (1992) provides more detailed
descriptions of the various processors and coprocessors available.
The 80x86 family of processors
Pentium processors are perhaps the most recognized components
of today’s PCs. They originate from a long line of Intel processors
dating back to the 1970s (see Table 1.1).