Today, cost-effective and powerful desktop and notebook computers are paving the way for new types of instruments --virtual instruments--. Virtual instruments are designed and built by the user to match specific needs by leveraging off the power and low cost of PCs and workstations.
Software is the key to virtual instruments. Application software empowers
the user with the tools necessary to build virtual instruments and expand
their functionality by providing connectivity to the enormous capabilities
of PCs, workstations, and their assortment of applications, boosting performance,
flexibility, reusability and reconfigurability while diminishing at the same
time development and maintenance costs.
FUNDAMENTALS OF VIRTUAL INSTRUMENTS | |
Tradtional Instruments | Virtual Instruments |
Vendor-defined | User-defined |
Function-specific, stand-alone with limited connectivity | Application-oriented system with connectivity to networks, peripherals, and applications |
Hardware is the key | Software is the key |
Expensive | Low-cost, reusable |
Closed, fixed functionality | Open, flexible functionality leveraging off familiar computer technology |
Slow turn on technology (5-10 year life cycle) | Fast turn on technology (1-2 year life cycle) |
Minimal economics of scale | Maximum economics of scale |
High development and maintenance costs | Software minimizes development and maintenance costs |
The GPIB is like an ordinary computer bus, except that a computer has its circuit cards interconnected via a backplane - the GPIB has stand-alone devices interconnected by standard cables.
The role of the GPIB Controller is comparable to the role of a computer CPU, but a better analogy is to compare the Controller to the switching center of a city telephone system.
The switching center (Controller) monitors the communications network (GPIB). When the center (Controller) notices that a party (device) wants to make a call (send a data message), it connects the caller (Talker) to the receiver (Listener).
The Controller usually addresses (or enables) a Talker and a Listener before the Talker can send its message to the Listener. After the message is transmitted, the Controller may address other Talkers and Listeners.
Some GPIB configurations do not require a Controller. For example, a device that is always a Talker, called a talk-only device, is connected to one or more listen-only devices.
A Controller is necessary when the active or addressed Talker or Listener must be changed. The Controller function is usually handled by a computer.
A computer with the appropriate hardware and software could perform the roles of Talker/Listener and Controller.
GPIB Signals and Lines
Linear Configuration | Star Configuration |
The standard connector is the Amphenol or Cinch Series 57 MICRORIBBON or AMP CHAMP type. For special interconnect applications, an adapter cable with non-standard cable and/or connectors is used.
|
|
|||||||||||||||||||||||||||||||
|
GPIB Connector and Signal Assignment
The GPIB uses negative logic with standard TTL levels. When DAV is true, for example, it is a TTL low level (<= 0.8 V), and when DAV is false, it is a TTL high level (>= 2.0 V).
The following restrictions are typical for normal operation:
Evolution of GPIB Instrumentation Standards
The ANSI/IEEE Standard 488-1975, now called IEEE 488.1, greatly simplified the interconnection of programmable instrumentation by clearly defining mechanical, electrical, and hardware protocol specifications. For the first time, instruments from different manufacturers were interconnected by a standard cable. Although this standard went a long way towards improving the productivity of test engineers, the standard did have a number of shortcomings. Specifically, IEEE 488.1 did not address data formats, status reporting, message exchange protocol, common configuration commands, or device-specific commands. As a result, each manufacturer implemented these items differently, leaving the test system developer with a formidable task.
IEEE 488.2 enhanced and strengthened IEEE 488.1 by standardizing data formats, status reporting, error handling, Controller functionality, and common commands to which all instruments must respond in a defined manner. By standardizing these issues, IEEE 488.2 systems are much more compatible and reliable. The IEEE 488.2 standard focuses mainly on the software protocol issues and thus maintains compatibility with the hardware-oriented IEEE 488.1 standard.
SCPI built on the IEEE 488.2 standard and defined device-specific commands that standardize programming instruments. SCPI systems are much easier to program and maintain. In many cases, you can interchange or upgrade instruments without having to change the test program. The combination of SCPI and IEEE 488.2 offers significant productivity gains, and finally, delivers as sound a software standard as IEEE 488.1 did a hardware standard.
Description | Control Sequence | Compliance |
Send ATN-true commands | SEND COMMAND | Mandatory |
Send address to send data | SEND SETUP | Mandatory |
Send ATN-false data | SEND DATA BYTES | Mandatory |
Send a program message | SEND | Mandatory |
Send address to receive data | RECEIVE SETUP | Mandatory |
Receive ATN-false data | RECEIVE/RESPONSE MESSAGE | Mandatory |
Receive a response message | RECEIVE | Mandatory |
Pulse IFC line | SEND IFC | Mandatory |
Place device in DCAS | DEVICE CLEAR | Mandatory |
Place devices in local state | ENABLE LOCAL CONTROLS | Mandatory |
Place devices in remote state | ENABLE REMOTE | Mandatory |
Place devices in remote with local lockout state | SET RWLS | Mandatory |
Place devices in local lockout state | SEND LLO | Mandatory |
Read IEEE-488.1 status byte | READ STATUS BYTE | Mandatory |
Send group execution trigger (GET) message | TRIGGER | Mandatory |
Give control to another device | PASS CONTROL | Optional |
Conduct a parallel poll | PERFORM PARALLEL POLL | Optional |
Configure devices' parallel poll responses | PARALLEL POLL CONFIGURE | Optional |
Disable devices' parallel poll capability | PARALLEL POLL UNCONFIGURE | Optional |
IEEE 488.2 Required and Optional Control Sequences
The IEEE 488.2 control sequences describe the exact states of the GPIB and the ordering of command messages for each of the defined operations. IEEE 488.2 control sequences remove the ambiguity of the possible bus conditions, so instruments and Controllers are much more compatible. By exactly defining the state of the bus and how devices should respond to specific messages, IEEE 488.2 removes such system development problems.
Keyword | Name | Compliance |
RESET | Reset System | Mandatory |
FINDRQS | Find Device Requesting Service | Optional |
ALLSPOLL | Serial Poll All Devices | Mandatory |
PASSCTL | Pass Control | Optional |
REQUESTCTL | Request Control | Optional |
FINDLSTN | Find Listeners | Optional |
SETADD | Set Address | Optional, but requires FINDLSTN |
TESTSYS | Self-Test System | Optional |
IEEE 488.2 Controller Protocols
These protocols reduce development time because they combine several commands to execute the most com-mon operations required by any test system. The RESET protocol ensures that the GPIB has been initialized and all devices have been cleared and set to a known state. The ALLSPOLL protocol serial polls each device and returns the status byte of each device. The PASSCTL and REQUESTCTL protocols pass control of the bus between a number of different devices. The TESTSYS protocol instructs each device to run its own self-tests and report back to the Controller whether it has a problem or is ready for operation.
Perhaps the two most important protocols are FINDLSTN and FINDRQS. The FINDLSTN protocol takes advantage of the IEEE 488.2 Controller capability of monitoring bus lines to locate listening devices on the bus. The Controller implements the FINDLSTN protocol by issuing a particular listen address and then monitoring the NDAC handshake line to determine if a device exists at that address. The result of the FINDLSTN protocol is a list of addresses for all the located devices. FINDLSTN is used at the start of an application program to ensure proper system configuration and to provide a valid list of GPIB devices that can be used as the input parameter to all other IEEE 488.2 protocols. The bus line monitoring capability of an IEEE 488.2 Controller is also useful to detect and diagnose problems within a test system.
The FINDRQS protocol is an efficient mechanism for locating and polling devices that are requesting service. It uses the IEEE 488.2 Controller capability of sensing the FALSE to TRUE transition of the SRQ line. You prioritize the input list of devices so that the more critical devices receive service first. If the application program can jump to this protocol immediately upon the assertion of the SRQ line, you increase program efficiency and throughput.
IEEE 488.2 defines a minimum set of IEEE 488.1 interface capabilities that an instrument must have. All devices must be able to send and receive data, request service, and respond to a device clear message. IEEE 488.2 defines precisely the format of commands sent to instruments and the format and coding of responses sent by instruments.
All instruments must perform certain operations to communicate on the bus and report status. Because these operations are common to all instruments, IEEE 488.2 defined the programming commands used to execute these operations and the queries used to receive common status information. These common commands and queries are shown in Table 3.
Mnemonic | Group | Description |
*IDN? | System Data | Identification query |
*RST | Internal Operations | Reset |
*TST? | Internal Operations | Self-test query |
*OPC | Synchronization | Operation complete |
*OPC? | Synchronization | Opearation complete query |
*WAI | Synchronization | Wait to complete |
*CLS | Status and Event | Clear status |
*ESE | Status and Event | Event status enable |
*ESE? | Status and Event | Event status enable query |
*ESR? | Status and Event | Event status register query |
*SRE | Status and Event | Service request enable |
*SRE? | Status and Event | Service request enable query |
*STB? | Status and Event | Read status byte query |
IEEE 488.2 Mandatory Common Commands
Because IEEE 488.2 standardizes status reporting, the Controller knows exactly how to obtain status information from every instrument in the system. This status reporting model builds upon the IEEE 488.1 status byte to provide more detailed status information. The status reporting model is shown in Figure 7.
IEEE 488.2 Status Report Model
SCPI is a complete, yet extendable, standard that unifies the software programming commands for instruments. The first version of the standard was released in mid-1990. Today, the SCPI Consortium continues to add commands and functionality to the SCPI standard. SCPI has its own set of required common commands in addition to the mandatory IEEE 488.2 common commands and queries. Although IEEE 488.2 is used as its basis, SCPI defines programming commands that you can use with any type of hardware or communication link.
SCPI specifies standard rules for abbreviating command keywords and uses the IEEE 488.2 message exchange protocol rules to format commands and parameters. You may use command keywords in their long form (MEASure) or their short form shown in capital letters (MEAS).
SCPI offers numerous advantages to the test engineer. One of these is that SCPI provides a comprehensive set of programming functions covering all the major functions of an instrument. This standard command set ensures a higher degree of instrument interchangeability and minimizes the effort involved in designing new test systems. The SCPI command set is hierarchical, so adding commands for more specific or newer functionality is easily accommodated.
The SCPI Instrument Model
All of the functional components of the instrument model may not apply to every instrument. For example, an oscilloscope does not have the functionality defined by the signal generation block in the SCPI model. SCPI defines hierarchical command sets to control specific functionality within each of these functional components.
The signal routing component controls the connection of a signal to the instrument's internal functions; the measurement component converts the signal into a preprocessed form; and the signal generation component converts internal data to real-world signals. The memory component stores data inside the instrument. The format component converts the instrument data to a form that you can transmit across a standard bus. The trigger component synchronizes instrument actions with internal functions, external events, or other instruments.
The measurement function gives the highest level of compatibility between instruments because a measurement is specified by signal parameters, not instrument functionality. In most cases, you can exchange an instrument that makes a particular measurement with another instrument capable of making the same measurement without changing the SCPI command.
The MEASurement component is subdivided into three distinct parts --INPut, SENSe, and CALCulate--. The INPut component conditions the incoming signal before it is converted into data by the SENSe block. INPut functions include filtering, biasing, and attenuation. The SENSe component converts signals into internal data that you can manipulate. SENSe functions control such parameters as range, resolution, gate time, and normal mode rejection. The CALCulate component converts the acquired data into a more useful format for a particular application. CALCulation functions include converting units, rise time, fall time, and frequency parameters.
The signal generation component converts data into output as physical signals. SCPI subdivides the signal generation block into three function blocks --OUTPut, SOURce, and CALCulate--. The OUTPut block conditions the outgoing signal after it is generated. OUTPut block functions include filtering, biasing, and attenuation. The SOURce block generates a signal based on specified characteristics and internal data. SOURce block functions specify such signal parameters as amplitude modulation, power, current, voltage, and frequency. The CALCulate block converts application data to account for signal generation anomalies such as correcting for external effects, converting units, and changing domains.
: MEASure:VOLTage:AC? 20, 0.001
HS488 Handshake
The required settling and hold times are user configurable, depending on the total length of cable and number of devices in the system. Between two devices and 2 m of cable, HS488 can transfer data up to 8 Mbytes/s. For a fully loaded system with 15 devices and 15 m of cable, HS488 transfer rates can reach 1.5 Mbytes/s.
HS488 Controllers always use the standard IEEE 488.1 3-wire handshake to transfer GPIB commands (bytes with Attention (ATN) asserted).
*****
STANDARDS: Official IEEE site for P488.1 - High-speed revision of 488.1-1987
standard instrument bus.
http://grouper.ieee.org/groups/imstc8/488/1/