Special note about timeouts, Multiline command group – National Instruments GPIB-BUF User Manual

Page 30

Advertising
background image

Technical Information

Chapte r 3

GPIB-BUF User Manual

3-8

© National Instruments Corp.

Special Note About Timeouts

If your current GPIB system relies on a timeout method to ensure a non-
functioning GPIB device does not hang the bus indefinitely, then it may be
necessary to adjust or disable the time limit to ensure that the target device
has enough time to respond to any requests for information.

For example, suppose that your current code sends a file to a plotter and
then prompts the plotter for its current status. If the file is large and GPIB
timeouts are in effect, the file is transferred to the GPIB-BUF followed
immediately by the plotter prompt. At this time, the Controller re-addresses
the GPIB-BUF to talk, starts its timeout timer, and waits for a response.
Since the GPIB-BUF is still spooling the data file to the plotter, which has
not yet received the prompt, the plotter cannot respond until the entire plot
is finished and the prompt is received. If the time required to finish the plot
and respond to the prompt are longer than the time limit of the Controller, a
timeout error will occur. This can be easily corrected by either increasing
or disabling time limits on GPIB operations of this type to very slow data
acceptors.

A more efficient way to handle responses after large file transfers is to wait
until the GPIB-BUF is empty before issuing the plotter request for
information. In this way, timeouts can remain in effect, and the GPIB
Talker can perform other useful work because it will not hang while waiting
for a plotter response. If SRQs are enabled, then the Controller need not
continually poll the GPIB-BUF, but can instead wait for an SRQ before
issuing the plotter request.

Multiline Command Group

When the GPIB-BUF receives either a GPIB Multiline Message SDC or
DCL via the GPIB IN port, it responds in one of several ways. The
response depends on the condition of switch 1 and 2 of the configuration
switch at location U38 on the printed circuit board.

If switch 1 is on, the GPIB-BUF ignores any SDC and DCL received and
takes no action. If switch 1 is off (default), the GPIB-BUF response
depends on the condition of switch 2.

If switch 2 is on, the GPIB-BUF immediately passes a DCL to the GPIB
target device when a DCL or SDC is received. If switch 2 is off (default),
the GPIB-BUF not only passes a DCL to the target device but also clears its

Advertising