ABSTRACT:
A program, LabVIEW, is used to enable a microcomputer to acquire and manipulate data and to generate output voltages.
TEXT REFERENCE:
Sime, Rodney J., "Physical Chemistry - Methods, Techniques and Experiments,"
Saunders Pub., Philadelphia, PA, 1990.
Chapt. 9 - 10.
OTHER REFERENCES:
LabVIEW Manuals.
GENERAL DESCRIPTION AND THEORY:
A microprocessor is a small computer element. It has all the elements of
a computer except for the memory and input/output devices and it is contained
in a very small package. In the case of the 8088 or 80286, which are the
microprocessors for the IBM PC and AT, respectively, the package is about
one by two inches. (The 80386, 80486 and pentium are a little larger.) In
spite of its small size the microprocessor has most of the computing power
associated with larger computers, however, because of its small size and
low cost it is now being used in the construction of many modern chemical
instruments. Instruments such as mass spectrometers, nmr spectrometers, gas
chromatographs, etc., often come equipped with a microprocessor and memory
to accomplish many of the tasks that used to require a large amount of sophisticated
electronic hardware. The advantage of the microprocessor is that the electronic
package is always the same for each instrument. It is the software or programs
for the microprocessor which are different in each of the instruments. Another
advantage of the software is that it can be changed easily (much more easily
than hardware) and so improvements in instrumentation can often be accommodated
by simply changing the program for the microprocessor. In addition, the microprocessor
allows an instrument to be "customized" for a particular analysis or purpose
at relatively low cost, in fact it can often be accomplished by one of the
laboratory workers. Since these microprocessors are becoming so prevalent
in chemical instrumentation, it is important that chemistry students have
the opportunity to get familiar with the operation and use of the microprocessor
in the laboratory.
A processor or microprocessor is only part of a computer. It is the part
that contains the logic and arithmetic functions together with some special
memory locations called registers. The instructions that enable the computer
to compute, read information, operate switches, etc., are executed in the
processor section of the computer. However, a computer is composed of several
additional components besides the processor. A sketch of a typical computer
arrangement is shown in figure one below:
Memory
RAM
Input/ Memory
Keyboard Output Processor ROM
Control Timer/Clock
Printer Aux. Memory
Disk
Figure 1. Computer System
As can be seen from the figure, memory and input/output functions are usually
part of any computer system. The memory serves the function of holding the
list of instructions for the processor and also stores data for the programs.
There are several different kinds of memory that are used by a computer.
The memory immediately accessible to the processor for reading from and writing
to is called random access memory (RAM). This form of memory is necessary
when the memory contents are to be changed during the execution of a program.
Another form of memory is read only memory (ROM) from which a processor may
receive instructions or data but on which it cannot write anything. ROM memory
is often used in microcomputer systems to contain programs which will used
over and over again. It is most useful to put the monitor or operating control
program in ROM so that it is always available and cannot be destroyed by
another program writing over it. A mini-operating system for the IBM is contained
in ROM but the main operating systems are read in from a magnetic disk. A
magnetic disk is an auxiliary memory system. It is usually much larger than
the RAM memory but not always. Auxiliary memory in the form of a floppy disk
is quite portable and can be used to store and transport programs and data
from one computer system to another. Probably one of the most important parts
of the computer system is the input/output control system since it is by means
of this section that the processor communicates with the outside world either
through devices such as typewriter or keyboard-display system or to the instrument
control world of electrical signals. The microcomputer system will do the
former as it is delivered from the company. It is able to do the latter by
means of ICS AI08 I/O or National Instruments AT-MIO-16 boards for data acquisition
and control applications. Among other features, these boards contain timers,
analog to digital and digital to analog converters. The timer is used to
enable the computer system to operate according to definite time signals.
For example, a timer will allow the computer to take readings every ten seconds
if the program provides for this. The microcomputer has an interrupt system
which allows the timer to interrupt a program in execution so that a particular
operation can be carried out by an "interrupt program." When the interrupt
program has complete its action, the original program will continue from
where it was interrupted.
Most computer systems are rated in terms of the number of bytes in the
memory. A byte consists of eight bits. A bit is the fundamental unit of the
computer memory and is either a 0 or a 1. Since electronic instruments are
stupid they can only tell if something is on (1) or off(0). This means that
computers can only use a binary number system. Therefore all information that
goes into a computer has be changed into binary representation. Decimal numbers
are changed into their corresponding binary form and alphabetic characters
are represented by a binary code called ASCII. It may seem obvious to you
that both data and instructions are represented by a set of binary digits,
and that what is a computer instruction in one case will be just a piece
of data in another case. The difference to the processor lies in when they
are delivered to the processor. If the set of binary digits comes to the
processor during the instruction fetch cycle it is an instruction, while
if it comes to the processor during a data fetch cycle it is a piece of data.
The processor will execute a series of instructions in order, one after another
unless told to deviate from this order by either a branch or jump instruction.
A special register called the program counter stores the location of the
next instruction to be called.
There are other registers to be found in a processor. One which is always
found is the accumulator or main register. It is often called the A register
and here is where the arithmetic operations are carried out. Another type
of register which is useful is the index register. There are many uses of
an index register. One use to address a series of data by constructing the
address from the contents of the index register and from the address part
of the computer instruction code. The index register may also be used to
count down the number of times that a certain operation or series of instructions
are carried out. When the register is counted down to zero or a negative
value, a branch instruction may be used to go to another part of the program.
We have mentioned that the computer uses only binary numbers. This presents a problem to the programmer who normally does not think in binary. There is no easy conversion from binary to decimal. However, there is an easy conversion from binary to octal or hexadecimal. Most systems now use the hexadecimal notation for binary numbers. The hexadecimal system starts with the single digit, 0, and goes the single digit, F, (0 to 15 in decimal) before starting the two digit sequence at 10 (16 in decimal). The conversion is given below for numbers from 1 to 16:
Hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F 10
Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12
13 14 15 16
Tables for the conversions are available from a number of sources.
EQUIPMENT:
The microcomputer system used is equipped with the following features:
1) 32 Megabytes of RAM memory.
2) ROM memory containing a minimum operating system.
3) Input/output in the form of a keyboard/display.
4) Auxiliary storage in the form of a hard disk and floppy disk drives.
5) A data acquisition board equipped with analog to digital and digital to analog converters and several timers.
6) A pentium computer chip which includes a floating point processing unit.
PROGRAMS:
The computer program used is the LabVIEW program developed by the National
Instrument Company.
LABORATORY PROCEDURE:
Before using the computer system look to see that the computer board is
connected to the flat cable coming out of the back of the computer. The LabVIEW
program may be started by double clicking the LabVIEW icon on the display.
Part I: The Use of the LabVIEW Program

The opening panel of LabVIEW is shown above and this is the starting point for each section of the tutorials covered in this experiment.
For this introductory experiment you will follow the procedures outlined
in the LabVIEW Quick Start Guide. In this
guide you should carry out the procedures described in Chapters 1-3 and Chapters
5-6. Omit Chapter 4 since there are no instruments attached to the computer.
When you get to chapter 3, read the material in part II of this manual.
Part II: Data Acquisition and Voltage Output
One of the important functions of a computer system for data acquisition
is the ability to sample and store data at variety of rates, from very small
intervals of time to long periods of time. The data recorded can be saved
on a floppy disk for later use or further manipulation. The data acquisition
system used in the IBM PC AT can sample eight different analog signals. The
signal can be either AC or DC but it must be in the range of -5 to +5 volts.
The A to D converter used in the data acquisition system is located on a
board in the computer housing. It is a 12 bit analog to digital converter.
The A to D converter can function either as a 12 bit converter or an 8 bit
converter depending on the signal received from the computer program. The
A to D converter starts the conversion of the voltage value when it receives
a signal from the computer. When the conversion is complete (the analog values
is converted to an 8 or 12 bit digital value) the converter sends a signal
to the computer. Then the computer can read the digital value from the converter
and store it in the computer memory or write the value to a floppy disk.
In the case of the data acquisition used in this experiment the A to D converter
is multiplexed to eight different lines. This means that the converter can
be switched to each of eight different lines so that eight different analog
signals can be monitored simultaneously.
In this part of the experiment, the voltages of several batteries will be determined. The connection block is illustrated below in Figure 1. Connect one battery to
channel 0 - ACH0 and ACH8
the polarity will not matter since the value will be read as either negative or positive. Connect the second battery to
channel 1 - ACH1 and ACH9
When the connections have been made continue with Chapter 3.
If you have time at the end of the period you can try to set up and use the output channels listed below:
channel 0 - AO Gnd and DAC0
or to
channel 1 - AO Gnd and DAC1

Figure 1
It is important to gain familiarity with the system since it will be used
in several other experiments.