Manual

C
HAPTER
T
WO
:
Control by GPIB
WM-RCM-E Rev D ISSUED: February 2005
15
To make an actual talk address and listen address, we have to add the GPIB address to the ASCII values of the
base characters, to give the ASCII value of the new character. So a string of these commands looks like a
random set of characters. Using named variables makes programs easier to understand. For example, if we
have a DSO at GPIB address 4, and a PC at address 4, we construct the command strings as follows, for use
later in the program.
UnListen$ = Chr$ (63) : UnTalk$ = Chr$(95)
BaseListen% = 32 : BaseTalk% = 64 : DSOAddress% = 4
DSOListen$ = Chr$ (BaseListen% + DSOAddress%)
DSOTalk$ = Chr$ (BaseTalk% + DSOAddress%)
If the PC is at address 0, we can also write
PCTalk$ = Chr$ (BaseTalk%) : PCListen$ = Chr$(BaseListen%)
Finally:
DSOListenPCTalk$ = UnListen$ + UnTalk$ + PCTalk$ + DSOListen$
DSOTalkPCListen$ = UnListen$ + UnTalk$ + PCListen$ + DSOTalk$
These last two strings, once defined, can be used in programs for sending to the DSO.
GPIB SIGNALS
The GPIB system consists of 16 signal lines and eight ground or shield lines. The signal lines are divided into
three groups:
Data Lines: These eight lines, usually called DIO1 through DIO8, carry both program and interface messages.
Most of the messages use the 7-bit ASCII code, in which case DIO8 is unused.
Handshake Lines: These three lines control the transfer of message bytes between devices. The process is
called a three-wire interlocked handshake, and it guarantees that the message bytes on the data lines are sent
and received without transmission error.
Interface Management Lines: These five lines manage the flow of information across the interface:
ATN (ATteNtion): The controller drives the ATN line true when it uses the data lines to send
interface messages such as talk and listen addresses or a device clear (DCL) message. When ATN is
false, the bus is in data mode for the transfer of program messages from talkers to listeners.
IFC (InterFace Clear): The controller sets the IFC line true to initialize the bus.
REN (Remote ENable): The controller uses this line to place devices in remote or local program
mode.
SRQ (Service ReQuest): Any device can drive the SRQ line true to asynchronously request service
from the controller. This is the equivalent of a single interrupt line on a computer bus.