Skip to content
Physics and Astronomy
Home Our Teaching Resources CDHW Interfaces
Back to top

Computer Interfaces for Instrumentation Systems

by Charles D.H. Williams

Contents

Introduction

This is an introduction to the interfaces commonly used to connect computers to instrument systems. It is not intended to be definitive, or very detailed, but to give the reader an idea of what is readily achievable with the various systems. I'd welcome corrections and suggestions for improvements.

This HTML document supports module PHY3128.

RS-232

The interface now described by the Electronic Industries Association RS-232-C standard was started life in the late 1960s as a method for connecting a computer to a modem. A full implementation comprises 2 data lines, 6 control lines and one ground. Data is transmitted using a serial (i.e. one bit at a time) full-duplex (i.e. simultaneous send and receive is possible) at a rate governed by the cable capacitance. The maximum cable length specified by the standard is 17m corresponding to a data rate of 20kbit/s, but up to ten times this is possible over shorter distances.

Until about 1999, almost all personal computers had at least one RS232-compatible serial 'comm port' which could be used to communicate with a single device using a simple (two core plus ground) cable. It was, therefore, a lost-cost option and has been widely used. Various manufacturers have adapted it to more general purposes. For example, the Oxford Instruments ISOBUS is based on RS232 with minor changes to allow several instruments to share a common line and with the added benefit of optical-isolation between instruments.

Unfortunately, the RS232 interface has been superceded on mass-market PC's by USB ports and FireWire ports. Many types of relatively inexpensive RS232 adapters are available at the time of writing (2004), but the market will eventually shrink and prices will rise.

See also:

RS-422, RS-423 and RS-485

Several standards have evolved to supersede RS-232 standard. They support higher data rates and greater immunity to electrical interference and offer backwards compatibility.

RS-422 is used in situations where long distances are required, it can drive up to 1200m at 100kbit/s, and up to 1Mbit/s over short distances. RS-422 uses a differential driver, uses a four-conductor cable, and up to ten receivers can be on a multi-dropped network or bus. RS-422 can be used as a direct substitute for RS-232 in many cases. Until about 1999 all Apple Macintosh computers included RS-422 interfaces (e.g. LocalTalk). RS-423 is an unbalanced (i.e. not differential) driver variant.

RS-485 is like RS-422 but RS-422 allows just one driver with multiple receivers whereas RS-485 supports multiple drivers and receivers RS-485 also allows up to thirty two (32) multi-dropped receivers or transmitters on a multi-dropped network or bus. At 90 kbit/s, the maximum cable length is 1250 m, and at 10 Mbit/s it is 15 m. The devices are half-duplex (i.e. send or receive, but not both at the same time). For more nodes or long distances, you can use repeaters that regenerate the signals and begin a new RS-485 line.

See also:

IEEE-488 (GPIB)

This interface started life in 1965 as the Hewlett-Packard HP-IB but was renamed as GPIB (General Purpose Interface Bus) by the IEEE-488 (1975) committee that standardised it. In 1988 the standard, which related to hardware, was renamed (IEEE-488.1) and extended (IEEE-488.2) to cover software issues (IEEE-488.2) by defining: data formats, status reporting, error handling, controller functionality, and common instruments commands. IEEE-488.2 compliant systems tend to be quite well-behaved. The economics of the test and measurement market guarantees that IEEE-488 interfaces will continue to appear on new instruments for many years.

The IEEE-488 interface comprises 8 data lines, 8 control lines and 8 ground lines. Up to 15 devices can be interconnected on one bus. Each device is assigned a unique primary address, ranging from 4-30, by setting the address switches on the device. Devices are linked in either a daisy-chain or star (or some combination) configuration with up to 20 m of shielded 24-conductor cable. A maximum separation of 4 m is specified between any two devices, and an average of 2m over the entire bus. The standard IEEE-488 cable [picture] has an Amphenol CHAMP connector on both ends which allows piggy-back connections to be made. The data transfer rate can be up to 1 Mbyte/s.

Three types of devices can be connected to an IEEE-488 bus (Listeners, Talkers, and Controllers). Some devices include more than one of these functions. The Controller monitors communications. When it notices that a talker wants to send data it connects it to the appropriate listener(s). After the data has been transmitted the controller will continue to monitor and controlling activity on the bus.

Several controllers may be connected the bus but only one may be active at any given time. The active controller may pass control to another controller which in turn can pass it back or on to another controller. A listener is a device that can receive data from the bus when instructed by the controller, and a talker transmits data on to the bus when instructed. The controller can set up a talker and a group of listeners so that it is possible to send data between groups of devices as well.

In my experience, systems based on IEEE-488 tend to be rather costly in hardware terms, but they work well.

See also:

IEEE-1394 (FireWire)

The IEEE-1394 defines a serial serial interface that can use the bus cable to power devices. Although reduces the attached devices' need for ac-line-operated power supplies, many instruments require more power than the bus can deliver. Firewire transmits data in packets and incurs some overhead as a result. Devices have the option of using an isochronous mode, which guarantees the device a time slot for data transfer in every frame. Firewire frames are 125 msec long which means that despite a 'headline' transfer speed of 400 Mbit/s Firewire can be substantially slower in responding to instruments' service requests. Another problem with using the isochronous mode for test and measurement applications is that it doesn't guarantee lossless data transmission.

Firewire uses a peer-peer protocol, similar to IEEE-488. Using standard cable, the maximum length bus comprises 16 hops of 4.5m each. Each hop connects two devices, but each physical device can contain four logical nodes. A Firewire cable contains two twisted-pairs (signals and clock) and two untwisted conductors (power and ground). Including the connectors, the cost of these is comparable with that of IEEE-488 cables, but they are much neater. FireWire is 'hot pluggable' meaning that one can connect and disconnect devices while the system is powered up. In addition, devices operating at different communication rates can exist on the same communications chain, though a slower device must not be placed between two higher speed devices.

At the time of revision (February 2006) a significant number of of test and measurement instruments are being sold with FireWire ports. However, it seems to be declining in popularity as interface for scientific instruments in the face of competion from USB 2 and Ethernet (TCP/IP) interfaces.

See also:

USB (Universal Serial Bus)

USB 1.1 has many features in common with FireWire: serial data transmission, device powering, data sent in 1 ms packets. USB offers 1.5- and 12-Mbit/s speeds. Individual devices can use the bus for a maximum of 50% of the time. In practice, the maximum rate is not more than 0.6 Mbyte/s, which is lower than IEEE 488's 1-Mbyte/sec maximum, but fast enough to substitute for IEEE-488 in more than 80% of instruments.

The bus topology, and host-target protocol, mean that giving existing PC-based instruments a USB port not as trivial as it could be, but instruments with USB ports are coming onto the market increasing numbers.

The USB 2.0 specification was released in 2000. In addition to increasing the signaling rate from 12 MHz to 480 MHz, the specification describes a more advanced feature set and uses bandwidth more efficiently than 'Classic' USB. Version 2 of USB seems likely to prevent IEEE 1394 becoming widely adopted in instrument systems.

See also:

Ethernet (TCP/IP)

Instruments with ethernet interfaces have the great advantage that they can be interrogated and controlled from a desktop anywhere in the world. A 'web enabled' device behaves like a website and can be operated with standard browser. Systems based on these devices can make use of existing Ethernet networks and connecting an instrument directly into the internet makes sharing of data easy. Fast data transfer is possible, at up to 1GB/s if the network infrastructure is good. However, it is very difficult to secure any device connected to the public internet and extreme caution and a full evaluation of the risks involved is essential in every case.

See also:

Valid HTML 4.0! Visitor Status Bar

                                                                                                                                                                                                                                                                       

Validate   Link-check © Copyright & disclaimer Privacy & cookies Share
Back to top