Anritsu Driver User Manual

Communicating with Anritsu’s IEEE-488.2 Non-Compliant Instruments
Application Note
IEEE-488.2 Non-Compliance
Introduction
The purpose of this application note is to recognize the difficulties associated with remotely controlling some of Anritsu’s instruments via the GPIB bus.This note will define the exact cause of the difficulties and then describe a way to reliably communicate with these troublesome models.
GPIB Bus
Most Anritsu instruments can be remotely controlled by a computer using the GPIB bus. The GPIB bus has been a mainstay in the Test & Measurement world since 1965 and was standardized by publication of the IEEE-488 specification in 1975.There have been two major enhancements to this standard, with the latest being IEEE-488.2 in 1987.
The GPIB bus is used to send a series of 8-bit bytes between instruments or between a computer and an instrument. Most often the bytes transmitted are standard ASCII letters and numbers. For example, if a computer wants to set the frequency in a signal generator to 12345 Hz, the computer might send the command "FREQ 12345". Upon receipt of this command, the signal generator will immediately switch to the new 12345 frequency.That sounds simple enough, but how did the instrument know when it had received the entire command? Why didn't it switch to a new frequency of 123 after receiving the characters "FREQ 123"? How did it know to wait until the "5" was received? This raises the whole issue of command termination on the GPIB bus.
Command Termination
One method of signaling the end of a command is to add one additional special character, known as the EOS (End of Statement) character.The most common EOS is "new line", otherwise known as "line feed" or ASCII 0x0A.The receiving instrument can simply continue to accept bytes until it receives the designated EOS character, and then act on all of the preceding bytes.The EOS technique is the easiest to implement by both the transmitting and receiving devices, but it is slightly inefficient because an extra character must be transmitted with each command.The EOS technique can also become a problem if the data to be passed over the GPIB bus includes the EOS byte.For example, reading a long series of binary bytes from an A-to-D converter may eventually hit upon all possible binary values, including the special EOS value. This would cause the transmission to be prematurely terminated.
The alternative to using a special termination character is to use a termination signal outside the normal path of the data bytes.The GPIB bus is defined as 24 parallel lines, of which 8 lines carry the data bytes. One of the remaining 16 lines is the EOI (End or Identify) line.
The EOI line is always in one of two states; asserted (ground) or unasserted (+5 volts). Normally EOI is unasserted. However, a GPIB transmitter may elect to signal the end of a command string by asserting the EOI line at the same time as it is transmitting the last byte of the command.The EOI termination method is more difficult for the sender and receiver because 9 lines must be controlled or monitored (8 data lines plus EOI). By not sending the EOS character, the transmissions are slightly faster and there are no concerns about the data bytes matching a special EOS value.
The IEEE-488.2 standard mandates that GPIB commands must be terminated in one of three ways:
1. Line feed as the EOS character, with no EOI.
2. EOI during the last command character and no line feed.
3. Both line feed and EOI, meaning EOI is asserted during the line feed.
The IEEE-488.2 standard clearly states that a compliant device that is receiving commands from the GPIB bus must be able to accept commands no matter which of the three termination methods are used. Similarly, a compliant device transmitting commands on the GPIB bus must use one of these three termination methods and any one of the three methods is equally acceptable.
A customer desiring to control one of our instruments via the GPIB bus can use any one of many different programming languages or manual utilities.These tools allow the customer to send and receive GPIB commands to a device that is presumably compliant with the IEEE-488.2 standard. Most, if not all, of these tools default to use of termination method (2) because it is the most efficient and eliminates potential data conflicts. Some, but not all, of the tools can be customized to allow the use of termination methods (1) and (3).
Non-Compliance
The fundamental problem that people have in controlling a few Anritsu instruments arises from the fact that those instruments do not fully comply with the IEEE-488.2 standard. In particular, the instruments ignore the EOI line. Consequently, they are unable to receive a command terminated using method (2), the most commonly used method. Such non-compliant instruments are, however, able to reliably receive commands using methods (1) and (3) because in both cases a line feed is transmitted.
A typical user will connect their computer to an Anritsu instrument along with maybe a few other instruments, start up a GPIB utility such as National Instruments' MAX (Measurement and Automation Explorer), and attempt to communicate with the instruments. Most often everything works exactly as expected. Unfortunately, a few Anritsu instruments will not work as expected.The utility will recognize that the instrument is on the bus at a particular address and the instrument will go into Remote mode and accept characters. But the instrument will never execute the command.
A non-compliant instrument will properly receive and store away every character of the command and will continue to do so until it receives the terminating line feed that it is expecting.The transmitter, on the other hand, sends all the characters, asserting EOI on the last character, but because EOI was ignored by the non-compliant instrument, the instrument ends up waiting forever for a line feed and the customer ends up frustrated.
The typical user of our instruments understands the GPIB bus enough to know that ASCII characters are transmitted back and forth, but they often don't understand the concept of termination methods. Even if the user does understand termination methods, the Remote Control Manuals for the few non­compliant instruments still may not be helpful.
Loading...
+ 5 hidden pages