Behavior Research Methods, Instruments, & Computers 1995, 27 (2, 129-130)

An inexpensive l-millisecond experiment control interface for IBM PCs and its user-friendly control language


Jacksonville State University, Jacksonville, Alabama

An inexpensive, professionally manufactured, digital I/O experiment control interface for any PC-compatible computer is described. It plugs into a standard printer port and provides l-msec accuracy for up to 4 inputs and 22 outputs. It also allows experiment control procedures to be written in an easy-to-learn, easy-to-use Experiment Control language (ECBASIC). In addition to many instructions specifically designed to simplify behavioral research, ECBASIC provides for transparent collection and storage of event logs.

We developed a computer-based experiment control system optimized for behavioral research. Its prototypical niche is the control of inputs and outputs for an operant experimental chamber ("Skinner box"). However, it is also applicable in any situation where behavioral measures with l-msec accuracy are sufficient.

Our implementation strategy for the experiment control system was based on the notion of a network of "smart" apparatuses, rather than a complex interface that enables a single computer to control events in multiple experimental stations. Each control system is small, inexpensive, commercially manufactured, and can be mounted directly within an apparatus. Up to 16 apparatuses can then be networked together over a simple RS-422 serial line. This type of serial line is standard on a Macintosh and is optional on an IBM or a PC clone. In this network arrangement, experiment control programs are transferred from a general-purpose computer to the experimental stations, and data are returned to the "supervisory" computer across the serial line. We provide supervisory software for IBM PCs, Macintoshes, and Vaxes.

Mounting the intelligence and interface directly in each apparatus itself has two important advantages. First, it eliminates one of the major sources of unreliability in the control of experiments. The many wires from the control computer to the switches and lights are short and simple (i.e., shorter than 15 cm and with only a single connector). Secondly, the worst case response time in the control of an experiment is not compromised as more apparatuses are added to the research facility. A network of independent intelligent apparatuses allows operant research with pigeons, reaction time testing with humans, or any of a wide variety of different paradigms to be reliably and conveniently implemented simultaneously. The experiments are coordinated through a single, modest general-purpose supervisory computer such as a low level IBM PC or Apple Macintosh.

There were two major implementation decisions made when the experiment control system was developed. The first was the choice of a specially written BASIC optimized for experiment control as the control language (ECBASIC). The second was support for the transparent collection of complete, temporally tagged, event logs. ECBASIC was developed to provide researchers with a simple, intuitive way to specify experimental procedures. Our choice was to spend whatever time was necessary to develop an easy-to-learn, easy-to-use language for researchers, rather than to simply provide only an arcane programming language, at which researchers eventually could become proficient. Using the syntax of BASIC had the additional advantage that books and knowledgeable people are readily available for help if programming problems develop.

The decision to provide coordinated transparent event log support in both the experiment controller and the supervisory computer support software was made because event logs allow flexible, dynamic analysis, as well as secondary analysis. To date, the only reason for not collecting data in this way was the difficulty of collecting and storing the information. This type of data is now easy to obtain because ECBASIC and our supervisory computer support software do all the work transparently. A more extended treatment of these issues is provided in Palya and Walter (1993b). Additionally, the complete, 216-page illustrated manual for our system (Palya & Walter, 1993a) is available on Internet either through FTP ( or through a Mosaic compatible browser (

The specific implementation option subsequently detailed in the present paper is a system for researchers who (a) can dedicate an IBM PC to experiment control while an experiment is running, (b) run a single experiment at a time, and (c) must absolutely minimize the expense of a control system. In this case, rather than use our small networkable experiment control computer, virtually any IBM PC or clone can be used to run ECBASIC. Our adaptor board is plugged into the printer port of the PC clone. It allows any of our interface boards to be supported by an ECBASIC running on that computer. At present, interface boards provide 300-mA drivers, 2-A relays, or 5-A triacs as their primary output type. An adaptor board and "driver" interface board costs about $225 and provides for 20 300-mA drivers, one 2-A relay, one 5-A relay and four opto-isolated inputs. With this adaptor-board version of our experiment control system, virtually all of the power of ECBASIC can be used. An additional benefit of this configuration is that the keyboard input and CRT output of the IBM PC are also modestly supported. A hybrid apparatus (e.g., for reaction time) with both keyboard and switch closure input and both CRT and stimulus light output would be straightforward to construct.

The printer port interface version of our experiment control system can be upgraded easily. The printer port interface is simply replaced with our networkable control computer. In this way, the "intelligence" required to carry out the experiment can be off-loaded from the host computer. As a result, as many as 16 remote experimental stations can be supported, each of which is capable of maintaining l-msec accuracy even while running a very complex control program.

The details of ECBASIC are provided in Palya and Walter (1993b), and extensive examples of programming with ECBASIC are provided in Palya and Walter (1993a). Specific instructions were developed to conveniently deal with real-time control. For example, COUNT directs ECBASIC to transparently increment a designated variable each time a response occurs, TIME is a function that is evaluated as the time since a specified temporal anchor, and interrupt routines provide a convenient way to deal with concurrent tasks.


PALYA, W. L., & WALTER, D. E. (1993a). Document set for the high performance experiment controller. Internet address: (

PALYA, W. L., & WALTER, D. E. (1993b). A powerful, inexpensive experiment controller or IBM PC interface and experiment control language. Behavior Research Methods, Instruments, & Computers, 25, 127-136.

(Manuscript received December 1, 1994; accepted for publication January 19, 1995.)

This research was supported by a National Science Foundation grant (DIR-8915226) to W. L. Palya. The authors gratefully acknowledge the contributions of Elizabeth Palya. Correspondence and requests for reprints should be sent to W. L. Palya, Department of Psychology, Jacksonville State University, Jacksonville, AL 36265 (e-mail:


Date Last Reviewed : November 18, 2002