VX-1700 CAT O
PERATION
R
EFERENCE
B
OOK
CAT
(
C
OMPUTER
A
IDED
T
RANSCEIVER
)
O
PERATION
C
ODING
E
XAMPLES
Although Vertex Standard Co., Ltd. cannot offer to provide complete CAT control programs (owing to the wide
variety of incompatible computers used by our customers). We present here with a few examples of critical
CAT I/O functions, in BASIC. Note that not all forms or BASIC may support some of the commands, in which
case alternate algorithms may need to developed in order to duplicate the functions of those shown.
S
ENDING
A
C
OMMAND
After “opening” the computer’s serial port for 4800
baud, 8 data bits, two stop bits, and no parity as I/O
device #2, any CAT command may be sent. The in-
struction opcode is sent last, with the first (MSB)
parameter sent just before it, and the LSB param-
eter (or dummies) sent first. The parameters are sent
in reverse order from that in which they appear in
the “CAT Commands” table. Note also that, in the
following examples, we are sending zeroes as
dummy bytes, although this is not necessary. If you
decide to send commands through a five-byte array,
the values or the dummy parameters need not be
cleared.
The following command could, for example, be used
to set the frequency of the display to 14.250.0 MHz:
PRINT #2,
CHR$(&H00);CHR$(&H50);CHR$(&H42);CHR$(&H01);
CHR$(&HA);
Notice here that the BCD values can be sent just by
preceding the decimal digits with “&H” in this ex-
ample. However, in an actual program, you may pre-
fer to convert the decimal frequency variable in the
program to an ASCII string, and the convert the string
to characters through a lookup table. If you send a
parameter that is out of range for the intended func-
tion, or not among the specified legal values for that
function, the
VX-1700
should do nothing. Therefore,
you may wish to alternate your sending of commands
or command groups with a Read Flags or an Update
command, allowing the transceiver to let the com-
puter know if everything sent so far has been ac-
cepted and acted upon as expected.
Bear in mind that some commands specify “binary”
(as opposed to BCD-formatted) parameters. You can
send binary parameters without going through the
character/hex string conversion process. For ex-
ample, the CH parameter in the Command table is
binary. You could have the
VX-1700
recall Memory
Channel “1-29” as follows:
PRINT #2,
CHR$(0);CHR$(0);CHR$(0);CHR$(29);CHR$(2);
R
EADING
R
ETURNED
D
ATA
The reading process is easily done through a loop,
storing incoming data into an array, which can then
be processed after all expected bytes have been read
into the array. To read the meter:
FOR I = 1 TO 5
MDATA(I)=ASC(INPUT$(1,#2))
NEXT I
Recall from above that the meter data consists of
four identical bytes, followed by a “padding” byte, so
we really only need to see one byte to get all of the
information this command offers. Nevertheless, we
must read all five bytes (or 1, 18, 19, in the case of
the Update data). After reading all of the data, We
can select the bytes of interest to us from the array
(MDATA, in the above example).
Page 7