Yaesu FT-1000MP Operating Manual page 81

Hide thumbs Also See for FT-1000MP:
Table of Contents

Advertisement

CAT System Computer Control
Coding Examples
Although Yaesu Musen does not provide CAT
control software (owing to the large variety of
computers and operating systems used by our
customers), the following are a few examples of
critical CAT I10 functions, in Basic. Note that all
variations of Basic may not support some of the
commands, in which case alternate algorithms
may need to be developed to duplicate the func-
tions of those shown.
Sending a Command
After "opening" the computer's serial port for
4800-baud, 8 data bits and 2 stop bits with no
parity, as I10 device
#2,
any C A l command may
be sent. However, if you determine that your com-
puter may need extra time to process data re-
turned from the transceiver, you should send the
Pacing command first. Mere is an example of the
Pacing command setting a 2-ms delay:
PRINT #2,CHR$(O);CHR$(O);CHR$(O);CHR$(2);CHR$(&HE);
Notice that the instruction opcode is sent last,
with the first (MSB) parameter sent just before it,
and the LSB parameter (or dummies) sent first.
This means that the parameters are sent in the
reverse order from that in which they appear in the
CAT Commands table. Also note that in this and
the following examples, we are sending zeros as
dummy bytes; this is not necessary, however. If
you decide to send commands through a 5-byte
array, the values of the dummy parameters need
not be cleared. Also note the semicolon at the end
of the line, to prevent Basic from sending extra
bytes to "end the line" (the CAT system control
system is based on binary streams, not text
streams).
Using the same example as on page 74, the
following command could be used to set the fre-
quency of the display to 14.25000 MHz:
Notice here that the BCD values can be sent
just by preceding the decimal digits with "&H" in
this example, However, in an actual program, it
may be preferable to convert the decimal fre-
quency variable in the program to an ASCII string,
and then to convert the string to characters
through a lookup table.
If you send a parameter that is out of range for
the intended function, or not among the specified
legal values for that function, the FT-1000MP
should do nothing. Therefore, you may wish to
alternate your sending regular commands or com-
mand groups with the Read Flags or short-form
Update commands, allowing the transceiver to let
the computer know if everything sent so far has
been accepted and acted upon as expected.
Bear in mind that some commands specify
"binary", as opposed to BCD formatted parame-
ters. You can send binary parameters without
going through the characterlhex string conversion
process. For example, the CH parameter in the
Command table is a binary value. You could have
the FT-1000MP recall memory channel 50 (deci-
mal) by the following:
Note that we must send 49 to get channel 50,
since the channel numbers in the comrnand start
from 0, while those on the display start with 1.
Reading Returned Data
The reading process is easily done through a
loop, storing incoming data into an array, which
can then be processed after the entire array has
been read. To read the meter:
FOR
!=I
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 filler byte, so
we really only need to see one byte to get all of
the information this command offers. Neverthe-
less, we must read all five bytes (or 1, 16, or
1,863, 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
79

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents