PROGRAMMER'S GUIDE Page 95
C
YBER
A
MP
380, COPYRIGHT MARCH 2002, AXON INSTRUMENTS, INC.
"AT" Command Protocols
The "AT" command set consists of ASCII commands and rules governing the commands that are sent
by the host computer to instruments on the Axon expandable RS-232 bus.
1) Each command from the host must commence with the letters "AT". Upper case is required for
the letters "AT" but case is irrelevant for subsequent characters in the command string. This
prefix is crucially important because it is used by the instrument to determine the baud rate and
the parity.
An incidental benefit of prefixing all command strings with "AT" is that it ensures that the
instrument will not respond to spurious characters on the serial port.
2) The third character in the command string is usually a number from 0 to 9. This is the address of
the device for which the command is intended. This manual uses "d" for "device" number when
referring to this address.
If no device number is specified, all devices on the bus will respond. (There is a potential
conflict if more than one device is connected.) This mode of operation is useful for test and
development purposes. However, application programs should always specify a device number.
3) All characters after the "ATd" prefix represent the command.
4) Certain commands are reserved as being applicable to all instruments that reside on the Axon
expandable RS-232 bus. At the time this manual was printed, only one such command was
defined. This is "ATdS", where "S" stands for status.
On receipt of an "ATdS" command, the instrument numbered "d" must respond with a
description of its model number and ROM version number. By sequentially issuing the ATdS
command for all values of d from 0 to 9, the host computer can determine what instruments are
connected to the bus.
There is a verbose form of this command, called "ATdS+". The instrument numbered "d" must
respond with a description of its model number, serial number, ROM version number and the
internal settings, in a prescribed format.
5) All command strings from the host must be terminated by a carriage return. All responses from
the instrument are terminated by a right arrow, ">".
6) If a command is not recognized, or if there is an error executing the command, the instrument
responds with a question mark (?) followed by a carriage return and the right arrow.
7) Multiple commands can be concatenated into a single command string, prefixed by "ATd" and
terminated by a carriage return. Spaces can be inserted between commands to improve clarity.
Spaces can also be inserted between commands and data. There is a 64 character limit to the
command string length.
8) Leading zeros are always ignored and do not have to be supplied.
Comentarios a estos manuales