Coding Examples - Yaesu Mark-V FT-1000MP Operating Manual

Hf transceiver
Hide thumbs Also See for Mark-V FT-1000MP:
Table of Contents

Advertisement

Although Yaesu Musen does not provide CAT con-
trol software (owing to the large variety of computers
and operating systems used by our customers), the
following are a few examples of critical CAT I/O func-
tions, in Basic. Note that all variations of Basic may not
support some of the commands, in which case alter-
nate algorithms may need to be developed to dupli-
cate the functions of those shown.
S
C
ENDING A
OMMAND
After "opening" the computer's serial port for 4800-
baud, 8 data bits and 2 stop bits with no parity, as I/O
device #2, any CAT command may be sent. How-
ever, if you determine that your computer may need
extra time to process data returned from the transceiver,
you should send the Pacing command first. Here is an
example of the Pacing command setting a 2-ms de-
lay:
PRINT #2,
CHR$(0);CHR$(0);CHR$(0);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 neces-
sary, 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 sys-
tem is based on binary streams, not text streams).
Using the same example as on page 87, the follow-
ing command could be used to set the frequency of
the display to 14.25000 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-
MARK-V FT-1000MP Operating Manual
CAT System Computer Contro
C
E
ODING
XAMPLES
ample. However, in an actual program, it may be pref-
erable to convert the decimal frequency 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 MARK-V FT-1000MP
should do nothing. Therefore, you may wish to alter-
nate your sending regular commands or command
groups with the Read Flags or short-form Update com-
mands, 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 parameters. You can
send binary parameters without going through the char-
acter/hex string conversion process. For example, the
CH parameter in the Command table is a binary value.
You could have the MARK-V FT-1000MP recall
memory channel 50 (decimal) by the following:
PRINT#2,
CHR$(0);CHR$(0);CHR$(0);CHR$(49);CHR$(2);
Note that we must send 49 to get channel 50, since
the channel numbers in the command start from 0,
while those on the display start with 1.
R
EADING
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=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 filler byte, so we re-
ally only need to see one byte to get all of the informa-
tion this command offers. Nevertheless, we must read
all five bytes (or 1, 16, or 1,863, in the case of the Up-
date data). After reading all of the data, we can select
the bytes of interest to us from the array (MDATA, in
the above example).
R
D
ETURNED
ATA
page 93

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents