Chapter 5

Before you begin programming…

The RF Terminal operates in two basic ways:

One-Way communication, where all data transfer is initiated by the RF Terminal. This is not very useful, because it has no editing or prompting. The Base Station itself simply acknowledges the receipt of the data by echoing it back to the Terminal. The host computer has no dialog whatsoever with the Base Station or Terminal; it is simply used to take the data coming from the Base through the serial port and do something with it.

Two-Way communication, where messages from the host user program are sent to the Base Station (via the serial port), then from the Base Station to the RF Terminal. The Terminal responds back to the Base with data and its Terminal ID. The data is then transmitted from the Base to the host computer where it is processed and the next command is sent out. Each RF Terminal has a unique Terminal ID, allowing a single Base Station to handle up to 64 Terminals.

Two-way dialog is established when a Terminal SIGNS ON to the RF network. The host computer application waits until a Terminal SIGNS ON, then begins its processing by sending the first prompt out to the Terminal via the Base Station. If the Terminal does not receive a prompt from the host, it

goes into “sleep” mode, “waking up” and checking with the Base periodically (see Chapter 3; Operational Theory for details) to see if it has any messages

waiting. This conserves battery power and reduces radio traffic.

Two-Way mode requires programming to communicate with the Terminal where One-Way mode does not. We have tried to make it easy for the programmer to communicate with the Base Station; no protocol or handshaking is required. This type of communication is fine when the Base is located only a few feet from the serial port it is connected to. If you are locating your Base Station farther away, use shielded, grounded (bare wire Pin 1 touching shield) cable, lower baud rates and possibly, line drivers for very noisy environments. (Do not use Cat 5 wire for a serial cable).

Before you begin programming, there are some factors you should take into consideration during the planning process.

Plan for system failures. This includes hardware failures, software failures and operator failures. In order to create an efficient application, you must put some thought into what you will do when different parts of the system fail.

Look for All Errors. Be sure your program is trapping all possible error conditions that the Base Station may return to you. The list includes:

5-1

Page 52
Image 52
Worth Data 701 RF manual Before you begin programming…