November 1985
National Instruments
The cmd
and
wrt
programming messages are followed by a data
string which may contain or
data
Example
Message with Data String
The following lines of BASIC code:
PRINT # 1,
contain the function name
wrt, the
argument 2, and the data string
This programmin message is telling the GPIB-MAC to
write to the device at primary address 2.
is the data string which contains the data
will send out
on the GPIB. In this case, a
is automatically sent by BASIC
following each print string, so, again, it is not necessary to include it
here.
How Messages are Processed
The GPIB-MAC processes a programmin message on a line-by-
line basis. The GPIB-MAC buffers the entire message, interprets
the function name and arguments, then executes the message.
The data portions of the
wrt
and
cmd
functions are not processed
on a line-by-line basis. The data immediately following a
and a
cmd are
sent directly to the GPIB.
Function Names
The function names have been selected to indicate each function’s
purpose, thereby making your programs easy to understand.
However, if you wish to reduce some overhead in your program
and do not mind giving up these advantages, you may use only as
much of the function name as is necessary to distinguish it from
other functions. This abbreviated form of the function name is
shown in
boldface in the
function tables and in the syntax portions
of the function descriptions.
18
SECTION THREE PROGRAMMING THE GPIB-MAC