Data Acquisition Software
part of
In Vitro System Additional Documentation
by aegrumet@alum.mit.edu
The purpose of the data acquisition software is to streamline
data collection/presentation/analysis during and after an experiment.
Hardware
The hardware consists of a
Pentium 133MHz PC from Dell
and a Data Acquisition Processor (DAP) 3000a/212 from
Microstar Laboratories.
Languages
The software system is implemented in three different computer languages:
- The MATLAB language is used to set up a graphical user interface
which
- lets the experimenter specify the pulse heights and widths in the
stimulation waveform,
- lets the experimenter specify when data collection is to begin,
- plots the responses generated by stimulation, and
- lets the experimenter browse his data offline,
- The C language is used to interface MATLAB with the data
acquisition processor.
The C language routines are written in accordance with the
MATLAB API (MATLAB documentation, type 'helpdesk' at the MATLAB prompt)
and call the DAP driver routines. NOTE:For Windows95/98,
Microstar Laboratories provides a DAPTools for MATLAB
(http://www.mstarlabs.com/software/matlab.html) package which eliminates
the need for C code.
- The DAPL language, which runs in the DAP board's 486 processor.
This language sets the configuration for the board, telling it
how many channels of analog and digital output are needed and
when.
Why not just use LabView?
An equivalent system could probably be built using
hardware and software from
National Instruments, the makers
of LabView, and this may be preferable for someone starting
from scratch today.
I designed an alternate system in 1996 because
- I like Microstar's boards better (more analog and digital input and
output channels and higher update rates on the analog outputs),
- I already had 5 years' MATLAB experience under my belt and didn't want
to spend time learning a new software system,
- LabView was not available for Linux at the time (it is available now
in 1999).
Why not just use Windows95?
I chose to run the system on Linux instead of Windows95 because
- Linux doesn't crash,
- For the same hardware, MATLAB runs faster on Linux,
- Linux integrates well with MIT's unix-based computing environment.
The down side of Linux is that, though its usability is improving
all the time, it's still better suited to a computer buff than to your
average user.
Program Flow
Here is the typical sequence of events when the software is used:
- Experimenter launches MATLAB.
- Experimenter launches data acquisition software by typing 'intrfc'
at the MATLAB prompt.
- intrfc routines set a bunch of variables (e.g. the stimulation
pulse heights and widths) to their default values and displays these
on the screen.
- intrfc routines download configuration scripts to the DAP board.
- User changes some of the local variables (e.g. the pulse heights)
from their defaults by clicking on graphical screen controls
(e.g. buttons). The new values are displayed on the screen.
- User hits the start button to initiate an action (e.g. send
out 10 stimulation waveforms).
- Results of the action are displayed on the oscilloscope.
- The action terminates.
- If a recording routine is being run:
- Results are read out of memory and displayed on the computer screen,
- Experimenter is given the option of saving the results to disk.
aegrumet@alum.mit.edu