Lectrosonics PT3 User Manual

Page 25

Advertising
background image

Protocol Translator

SERIAL PORT COMMANDS AVAILABLE

All LecNet devices use a modification of the typical one-to-one connection between two RS-232 compatible devices.
LecNet devices have both an RS-232 transmitter and receiver section. The transmitter section is “tri-stated”, or placed
in a high impedance mode, until the particular device is addressed. To facilitate the simple parallel connection of
multiple devices on a single RS-232 port, an addressing scheme is employed to route commands from the host to the
proper LecNet device. When a device receives its address from the host computer, it temporarily turns on its RS-232
transmitter long enough to send whatever data is requested by the host. In this way, multiple devices may drive a
single transmit signal back to the host, because only the addressed device will turn on its transmitter.

Valid address values are 128-254 (80 hex-FE hex). The PT3 is a special case and always occupies address 255 (FF
hex). Because a LecNet device will interpret any single data byte whose value is greater than 127 as an address, single
byte data (as opposed to addresses) sent from the host must be in the range of 0-127. If a data value needs to be sent
from the host that exceeds 127, the host must format two bytes of output such that the first byte is the lower 7 bits of the
8 bit value, and the second byte is 1 if the MSB of the data byte is 1, or 0 if the MSB of the data byte is 0.

All interchange of commands and data with any LecNet device should be done in hex rather than ASCII. The only
exception to this is the return data on the Get Device Name command (see command description below). Each
LecNet command must be preceded by the address of the device to be controlled. If a device with the requested
address exists on the system, it will respond by sending a 0 (0 hex, not ASCII) back to the host. Thus, each inter­
change with a LecNet device follows this pattern:

1) Host sends device address in hex (1 byte);
2) Host receives byte of 0 hex from the LecNet device as acknowledgment;
3) Host sends command (1 byte, hex) to the LecNet device;
4) Host and LecNet device exchange data based on particular command sent.

Note that some LecNet commands cause LecNet devices to return an additional acknowledgment byte of data to
confirm the end of a transaction. This is most typical of commands that cause the LecNet device to be busy for more
than a few milliseconds processing the command. The additional acknowledgment byte lets the host know that the
LecNet device is no longer busy and can receive more commands. If a command does return an additional acknowl­
edgment byte, this will be explicitly stated in the command description.

As an example of a specific interchange between a host and a PT3 the following general procedure would be used to
get a name string back from the PT3:

Set up the communications parameters of the device which will be the host. The correct parameters for all LecNet
devices are 9600 baud, no parity, 8 data bits, 1 stop bit. This need only be done once when the host is initialized.

1) Host sends device address 255 (1 byte).
2) Host receives byte of 0 hex from the PT3 as acknowledgment;
3) Host sends command 1 hex (1 byte) to the PT3 to get the name data;
4) The PT3 sends to the host 4 bytes. The first byte is 3 hex, which is the number of bytes in the PT3’s name string.

The PT3 will then send the ASCII characters “P”, “T”, and “3” to the host.

The following section is a listing of available PT3 commands. The word “Host” in the command descriptions means the
IBM PC or compatible, AMX controller, or Crestron controller to which the PT3 is connected.

Rio Rancho, NM – USA

25

Advertising