November 1985
National Instruments
stat Return GPIB-MAC Status
Syntax:
Purpose:
Remarks:
General Use function
stat
or
stat [c]
or
stat [c] n
You use
stat
to obtain the status of the GPIB-MAC to
see if certain conditions are currently present. You use
stat most often to see if the previous operation resulted
in an error.
You should use stat frequently in the early stages of
your of your program development when your device’s
responses are likely to be unpredictable. The
MAC responds with status information in a form
depending on the mode or combination of modes you
chose.
n
indicates that the status information will be
returned as numeric strings. s indicates that the status
information will be returned in symbolic format, i.e.,
as mnemonic strings. c specifies that the status will be
returned after each programming message, eliminating
the need to call
stat
after each programming message.
Normally, you use s only when you are debugging your
code and you want to print the mnemonic for each piece
of status information.
The status information returned by the GPIB-MAC
contains four pieces of information: the GPIB-MAC
status, a gpib-error code, a serial-error code, and a
count. The GPIB-MAC returns a
following
each piece of the response.
75
SECTION FOUR FUNCTIONS