S Mode Functions
Chapter 5
GPIB-232CT User Manual
5-8
© National Instruments Corp.
cmd - Send GPIB Commands
Type:
Specialized Controller function
Syntax:
cm
d [#count]
<CR>
commands
<CR>
Purpose:
You
use
cmd
when the I/O and bus management functions do
not meet the needs of your device.
cmd
gives you precise
control over the GPIB. For example, in applications that
require command sequences not sent by other functions, you
can use
cmd
to transmit any sequence of interface messages
(commands) over the GPIB.
Remarks:
The
argument
count
is a numeric string preceded by a
number sign (
#
).
#count
specifies the number of GPIB
command bytes (interface messages) to send, which is a
number between 1 and 255. The number of command bytes
must not include the carriage return (<CR>) or linefeed
(<LF>) that you include to indicate the end of the
programming message.
The argument
commands
is a list of GPIB commands. These
commands are represented by their ASCII character
equivalents. For example, the GPIB Untalk (UNT) command
is the ASCII character underscore (
_
).
If you call
cmd
without
#count
, the GPIB-232CT
recognizes the end of the command string when it sees a
<CR> or an <LF>.
#count
is required only if the command
string contains a <CR> or an <LF> character. However, a
<CR> or an <LF> in the command string would be unusual
since neither of these is a defined GPIB command.
The GPIB commands, or interface messages, are listed in
Appendix A. They include device talk and listen addresses,
secondary addresses, messages, device clear and trigger
instructions, and other management messages.
Do not use
cmd
to send programming instructions to devices.
Use
rd
and
wrt
to send or receive device programming
instructions and other device dependent information.