
SERIAL PORT COMMANDS AVAILABLE
The AV62 uses a modification of the typical one-to-one connection between two RS-232 compatible devices. The AV62
has 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 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 (80h-FEh). 255 (FFh) is an invalid address and must not be used. Because the AV62
will interpret any single data byte whose value is greater than 127 as an address, single byte data (as opposed to ad
dresses) sent from the host must be in the range of 0-127. If a data value needs to be output that exceeds 127, two bytes
are 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.
Each AV62 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' back to the host. The following code fragment, in BASIC,
would be used to get an “Acknowledge” name string back from an AV62:
OPEN “COM1:9600,N,8,1” FOR RANDOM AS #1 LEN = 256 ‘Open com port 1 for 9600 ‘baud, no
‘parity, 8 data ‘bits, 1 stop bit.
...
...
PRINT #1, CHR$(138);
‘Output the device address.
DataByte% = ASC(INPUT$(1, #1))
‘Receive “0” byte. The ASC function is used to convert the
‘received string data to numeric data.
PRINT #1, CHR$(1);
‘Output the “Acknowledge” command.
DataByte% = ASC(INPUT$(1,#1))
‘Receive the length of the acknowledge string (4 for the AV62).
Name$ = INPUT$(DataByte%,#1)
‘Receive the name string (“AV62”)
The first PRINT and INPUT$ sequence must precede every command sent, even if the command is sent to the same AV62
as the previous command. Thus, each interchange with an AV62 follows this pattern:
1) Host sends device address (1 byte);
2) Host receives byte of “0” from AV62 as acknowledgement;
3) Host sends command (1 byte) to AV62;
4) Host and AV62 exchange data based on particular command sent.
Note that you must wait for the “0” acknowledgement byte from the AV62 before sending a command to the AV62.
AV62 Remote Control Usage Tips
1)
Review the general LecNet command structure sequence above, and be sure you understand it well. Incorrect byte
order, or failure to provide all necessary LecNet information will cause the AV62 to reset itself rather than be stuck
forever waiting for information from the host.
2)
Before attempting to control the AV62 remotely, use the Set Current Memory command (11) to set the AV62 to one of
the stored memories (i.e. memories 1-6). The reason for this is that if the AV62 is in the Local mode (memory 0), the
AV62 will read front and rear panel controls to set its operational parameters. By setting the AV62 to one of the stored
memories, the AV62 will ignore the front and rear panel controls and you may adjust the operational parameters using
serial commands. The Set Current Memory command allows the option to store the memory selection in non-volatile
memory or not. If you simply want to control the AV62 remotely, but do not want to change the current power-up
memory, don’t store the new selection in non-volatile memory.
The following is a listing of available commands grouped based on the AV62 function to which the commands are related.
13
Summary of Contents for AV 62
Page 19: ...Intentionally Blank 19 ...