WEFAX
33
The WEFAX Command
To cause your TNC to enter the WEFAX Mode, you use the WEFAX command.
KPC-4
and
KAM
owners must remember to set MAXUSERS 0/1 before issuing the WEFAX command.
WEFAX
n
This command will cause the TNC to sample the audio input at
n
samples per second. The value of
n
is determined by the number of pixels (dots) which can displayed across one line of your termi-
nal screen in the graphics mode. For instance, if the PC computer you use has 640 dots across the
screen and the WEFAX station is transmitting 2 lines per second (120 per minute) you should use
an
n
value of 1280. These values keep your TNC in sync with the HF WEFAX transmitting station.
If your WEFAX picture skews, adjust the TNC clock by using the the command DAYTWEAK. The
ABAUD rate of the TNC must be set and PERMed to a value at least 5/4 the WEFAX
n
rate. This
gives the terminal program time to display or store each pixel byte and to handle the extra start
and stop bits added to the 8 pixel bits/byte (coming at xxxx baud rate). XFLOW may be used with
WEFAX. To stop the sampling of WEFAX data and return to Command Mode, simply send a
Ctrl-C
to the TNC.
If you are using the Kantronics MAXFAX or PACFILE program with a PC compatible, you should set
the ABUD to 9600 in the TNC and PERM it at that value.
Suggestions for Writing a WEFAX Terminal Program
Preferences will vary for each WEFAX terminal program writer or user, but the following functions
seem appropriate, at a minimum, for enjoyable operation.
WEFAX Program Functions:
1. Be able to display maps and charts on your computer screen as they are being received (real
time).
2. Be able to store them on a disk as they are being received or after you have taken a look.
3. Be able to print the displayed or stored maps or charts.
4. Be able to clear the screen or map storage areas at any time.
What about hardware requirements? First of all, you'll have to have enough computer storage to
handle the resolution you want. To save every pixel the HF station sends, you'll need up to 1800
line, each line being your screen width in pixels (PC 640 pixels or 80 bytes) or 135 kBytes! How-
ever, your screen will not show this much. A PC or compatible in graphics mode can display 200 by
640 pixels, so we suggest that you write your program to save, for instance, 600 of 1800 lines at
640 pixels, or 48 kBytes. Then, you'd be saving every third line received and sampling at an incom-
ing bit rate of 1280 (640 by 2, hence the reason for WEFAX 1280). This will also improve the as-
pect ratio of the saved image, since the pixels on your PC screen are not square and the picture is
scanned at a resolution of 96 lines per inch. For the standard Macintosh, the normal screen is 512
pixel wide by 342 pixels high. The screen can therefore display more of a single picture at one
time, but the horizontal resolution is slightly less than the PC.
Speed of program execution is important! Generally, interpretive BASIC will be too slow unless you
want to limit reception to say one picture at a time. Most advanced BASICs will allow the allocation
of up to 32 k of storage in the I/O buffer. Then, as you are displaying incoming WEFAX lines, new
data will slowly accumulating in the buffer. If you don't have your program to do too much, inter-
pretive BASIC can just make it. Compiled BASIC, C or assembly language programs, of course, are
faster and more preferable.