Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 7 of 19

Worth Data R/F Terminal Owner's Guide, pages 61 to 70

Pages 61 to 70 of 180

The original document is the PDF (2.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Worth TriCoder LT71

Page 61

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. 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 16 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. 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.

5-1

Page 62

• 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: Sequence Errors detected Illegal Command detected Base Station Initialized Addressing a Terminal Not Signed In Command without an ID All of these error conditions are detailed in the next chapter. Don’t forget to program for them; this is a common mistake. Even though you don’t think your code will ever make a mistake, take advantage of feedback that the Base Station provides. Failure to do so is a common mistake. • Parse the Returned Strings thoroughly. Don’t assume anything about the next response from the Base to your program and look only for the partial string such as the ID only; parse the string returned completely and be sure you are examining every possibility. Failure to do so is a common mistake. • Plan for expansion. You may start small (1 base/1 Terminal) but try to create an application that will allow for easy expansion and addition especially of Terminals. • Use the Demo Programs. The demo programs can at least allow you to see how the system functions and whether you can anticipate any systemwide problems. The demo programs should also be used as a responsetime benchmark.

Failure Planning Hardware Failures Let’s assume that each part of the system has failed. How are you going to know what has happened and how are you going to recover? • The most frequent failures are at the Terminal level. If a Terminal has a hardware failure, it will not be able to SIGN OUT. It is possible for the Terminal operator to press the ON/OFF key or the F1 key by accident, forcing the Terminal to SIGN OUT - sometimes in the middle of a transaction. This happens at battery-changing time also. You need to plan for partial transactions - do you trash the data you do have and start over, or pick up where you left off?

5-2

Page 63

• Keep in mind that if a Terminal has SIGNED OUT in mid-transaction, the Base Station clears any pending message for that Terminal before it will allow it to SIGN ON again. Make allowances to re-send messages or prompts that were cleared upon SIGN ON if necessary. • If a Base Station has a hardware failure, neither the Terminal nor the host computer will be able to communicate with it. When the Base Station comes back on-line, it sends a “Base Station Initialized” message back to the host, letting the host know that it must re-initialize all Terminals and pick up any incomplete transactions.

Operator Errors • Plan on your operator walking out of range and going to lunch in the middle of a transaction. What do you do with the data you do have, and where are you going to start up again? • Let’s say your operator is SIGNED ON and decides it’s time to take a break. Instead of pressing the F1 key to SIGN OUT, he presses the OFF key. Pressing the OFF key is OK (it will SIGN him OUT) but there is a delay until the SIGN OUT is acknowledged. Because of the delay, the operator might think he didn’t press the key hard enough and press it again - this time actually powering down the Terminal before the SIGN OUT was complete. If this happens, you need to plan to re-send the last prompt to the Terminal when he SIGNs ON again.

5-3

Page 64

This page is a scan with no text; see it in the PDF.

Page 65

Chapter 6

Programming for the RF Terminal The four levels of programming support offered for the RF Terminal are: 1) Low Level ASCII sequences sent to and from the Base Station by the user program reading/writing to the serial port. 2) Low Level ASCII sequences sent to and from the Base Station using DLL for Windows for serial port reading/writing. 3) Active X drop-in components. Every necessary function is defined. You just complete the code for each function. 4) TCP/IP Active X drop-in components used by the “Server” computer to communicate with the “Client” computer that has the Base Station(s) attached.

LOW Level ASCII sequences directly Planning Remember, plan for every error that the Base Station might return including: Sequence Errors detected Illegal Command detected Base Station Initialization detected Addressing a Terminal Not Signed In detected Command without an ID Programs can be written in any language that has access to the serial port (reading/writing), regardless of the platform. No more than one Base Station is allowed for each serial port.

Host to Terminal Programming The basic format of a message that is transmitted from Host to Base to Terminal is fairly simple: Byte position

Function

Possible values

1 2+ Last

RF Terminal ID Command(s) Termination of message

0-F ** EOT (ASCII 4)

The RF Terminal ID is always the first byte and always only 1 character in length. There are 16 different possible values - the numbers 0-9 and the letters A-F. 6-1

Page 66

The Command(s) section of the message always starts with the second byte and can consist of one or more commands - including data to be displayed or voice messages to be broadcast. The last byte is always ASCII 4 (EOT) to terminate the message. Here is a listing of valid commands and examples: Command characters

Command function

*@

Reinitializes all terminals Reinitializes Terminal #3 Make Terminal #1 beep n (1-9) times Clears the entire screen (4 lines or 6 lines) on Terminal #2. *See more about 4 and 6 line displays on page 6-4. Clears line 1 on Terminal #0 Clears line 2 on Terminal #1 Clears line 3 on Terminal #2 Clears line 4 on Terminal #0 Clears line 5 on Terminal#3 (if 6 line display), Clears all lines if 4 line display. *See more about the two display types on page 64. Clears line 6 on a 6 line display. Will do nothing on a 4 line display. *See more about 4 and 6 line displays on page 6-4. Displays date and time on line n (1-4) in US (mm/dd/yy, hh:mm:ss) or Euro (dd/mm/yy, hh:mm:ss) format on Terminal #1 Play voice message #nn (01-99) on Terminal #1 Output dataxxxxxxx to serial port on Terminal #1 -max 255 chs

3@ 1@Bn 2@C0

*

0@C1 1@C2 2@C3 0@C4 3@C5

*

1@C6

*

1@Dn 1@Vnn 1@Sdataxxxx

A typical “prompt” command sequence follows the format below: 0@n,m,o,data where n is the line number (1-4) you want the prompt displayed on m is the character position (1-20) where you want the prompt displayed o is the character that determines whether the prompt is for display only (0) or is waiting for data input (1) See the table below for valid characters for this position.

data is the data you want displayed

For example, the command @1,1,1, Enter Quantity would display Enter Quantity starting at position 1 on line 1, then wait for the operator to enter their data.

6-2

Page 67

These are valid entries for the third position character: 0 1 2 3 4 5

A B C D E S p P R

No data input for this Command, Display ONLY Data input required from the keypad or scanner Only keypad input allowed, start un-shifted Only keypad input allowed, start SHIFTED Only scanner input allowed Only accept YES (Enter key or C key) or NO (0 key or B key) keypad response. (Terminal sends 1 for YES, 0 for NO). C and B key are there to facilitate YES/NO keypad entry while scanning with integrated laser. same as 1, but time stamped as prefix (hhmmss) same as 2, but time stamped as prefix (hhmmss) same as 3, but time stamped same as 4, but time stamped same as 4, but can press END key to break-out of scanneronly input mode. Terminal ID + CR is sent to host SHIFTED keypad input or scanner input un-shifted keypad entry with no display (for passwords) SHIFTED keypad entry with no display (for passwords) Data input required from the RS-232 serial port (waiting for serial input can be bypassed by pressing the ENTER key which will send a NULL data string back to host computer.) Uses for this are PDF 417 Serial Scanners, and the Cameo Printer’s magnetic stripe input. A POS terminal becomes possible. Scan the credit card and print the receipt, all on the RF Terminal.

Here are some rules and useful tips for creating messages (one or more commands per message): • Re-initialize commands *@, or n@ (where n is the Terminal ID 0-F) clear the buffer for terminal(s) in the Base Station. Following a re-initialization, the host program should re-display of all the screen data necessary to start the application. • A message with multiple commands is legal and useful. For example, the command “@1,1,0, PLEASE ENTER@2,1,1,QTY” would display PLEASE ENTER on line 1, display QTY on line 2, and then wait for data input. All 6 lines can be filled with one message. • Messages can be a combination of multiple commands, (i.e. voice messages, initialization, clearing lines, requesting data entry), up to 247 characters in length. A message cannot though, contain an @S command in combination with any other command. A message also should not contain more than 1 request for data entry (third character in command is 1). For example: @1,1,1,ITEM@2,1,1,QTY 6-3

Page 68

has two data entry “prompt” commands combined. If this message were sent to the RF Terminal, the first data entry prompt (@1,1,1,ITEM) would be executed, but any and all commands after the first data entry prompt in that statement would be ignored without warning – there will be no display or indication of an illegal command. • The @S command (for serial output) statement cannot be combined with any other command - even clear (@Cx) commands. After a @S command is successfully completed, the Base Station sends back to the host the RF Terminal ID followed by a CR (ASCII 13). There is a 247 character limit on data for this command. If you send a command of more than 247 characters, you will get an Illegal Command returned, (ID ? CR). If you need to send 300 characters of data, send the first part, wait for the acknowledgement (ID CR), and then send the remaining part. If you are using the @S command with a printer, you should have the Protocol parameter in the RF Terminal set to XON/XOFF. This will allow the RF Terminal to deal with the character buffer limitations of your particular printer. If you are using the O’Neil MicroFlash Printer, you must send a NULL character before the valid data to wake up the printer. See your printer manual for details and see Chapter 6 for details on printer protocol. If you are using a Cameo or Encore printer, you must have a RF Terminal that displays Z on the same line as the Frequency on the opening screen. If you don’t have a Z, the printer will not wake up. The Encore/Cameo printers wake up when their DSR line is raised; this takes a hardware modification on the RF Terminal which is no charge when specified at time of order; the cost to retrofit a unit for Cameo/Encore wake-up capability is the minimum repair charge, $85. Call us for an RMA number, as the terminals must come back to us. • Every statement must end with a data entry “prompt” command, whether the statement is a single command by itself or several commands combined together. Any illegal statement will be ignored as a command but will be displayed on the addressed RF Terminal display exactly as written. If no Terminal ID was included in the statement, it will try to display the invalid statement on ID 0. Once the ENTER key is pressed on the Terminal displaying the invalid statement, the terminal sends the Base Station a “?” character. The Base Station then in turn sends the message n?CR (where n is the Terminal ID and CR is a carriage return) back to the Host computer. RF Terminal software versions prior to 9.059 did not handle illegal statements the same way; for backwards compatibility, see the setup parameter for Protocol (change it to E). • Prior to RF Terminal version 9075, the RF Terminal was available only with a 4 line display. The “Clear lines” command (@Cx) for the 4 line 6-4

Page 69

displays differ slightly from the “Clear lines” command for the current 6 line displays. The following table shows the programming differences that started with version 9075: Command @C0

Prior to 9075 Command did not exist

@C5

Cleared all lines on a 4 line display

@C6

Command did not exist

9075 and after Clears all lines on both a 4 line display and a 6 line display. Clears line 5 on a 6 line display. Clears ALL lines on a 4 line display. Clears line 6 on a 6 line display. Will not affect a 4 line display

There are several other changes concerning the display in version 9075 and after: •

In order to use 6 line display terminals as 6 line terminals in a existing 4 line system, the Base Station must have firmware version DLx9075 or greater. If you try to use a 6 line terminal in 6 line mode on a Base Station with a version prior to DLx9075, the Base Station will send back an erroneous message: Base Reinitialized Cycle Power on RF Terminal and Sign-On

•

In order to maintain compatibility with 4 line display terminals in an existing system, there is a new option in the RF Terminal Setup for 6 line display terminals. The LCD DISPLAY MODE allows the user to configure a 6 line display terminal as a 4 line display (centering the data on the display and conforming to the old programming command format, i.e. @C05 clears all lines). See Installation and Setup for details on how to get into LCD DISPLAY MODE.

•

The SIGN ON character for a 6 line display RF Terminal operating in 6 line display mode (see the previous point concerning LCD DISPLAY MODE) is different than for a 4 line display. Prior to 9075, all terminals signed on using ASCII 15. As of 9075, a 6 line display terminal operating in 6 line mode signs on using ASCII 22. If the 6 line terminal is configured for 4 line display, it signs on using ASCII 15, as do all terminals prior to version 9075. This allows you to use both types of display in the same system and be able to distinguish between the two terminal types. See page 6-6 for more information on SIGN ON. 6-5

Page 70

CAUTION: All 6 line display terminals are by default, configured as 6 line display terminals and will try to SIGN ON using ASCII 22. If you are trying to SIGN ON to an existing 4 line display terminal system that has not had any changes in its programming to utilize the 6 line display terminals, the 6 line display terminal will NOT BE ABLE TO SIGN ON. Make sure to re-configure the Terminal using the LCD DISPLAY MODE to operate as a 4 line display terminal. •

4 line display terminals can be upgraded to 6 line display terminals for $150.00 per terminal. Call us for an RMA number, as the terminals must come back to us for the upgrade.

Here are some sample command statements utilizing some of the programming tips offered above: @2,1,1,ENTER ITEM NO

Display ENTER ITEM NO on line 2, position 1 and wait for wait for data input

@V23@1,2,1,WRONG ITEM

Play voice message 23, display WRONG ITEM on line1, position 2 and wait for data input

@C1@1,7,0,PICKING

Clear line 1. Display PICKING at position 7 of line 1. This command by itself is illegal. To be a valid statement, it must end with a data entry request. For example: @C1@1,7,0,PICKING@2,7,1,ITEM Since only one command can be a “prompt” data entry request, this is an illegal statement and would be ignored as a command.

@1,1,1,ITEM@2,1,1,QTY

Base Station to Host Formats The basic format of a message that is transmitted from Base to Host is fairly simple: Byte position

Function

Possible values

1 2+ Last

RF Terminal ID Data Transmitted Termination of message

0-F ** CR (ASCII 13)

Typically, the Base Station is sending the “answer” to the hosts “question” - for example, if a Base sent a host message to a terminal #2 that said: 2@1,1,1,ITEM NUMBER + EOT The RF Terminal would display ITEM NUMBER on line 1, position 1 and accordingly, the operator would then enter an item number by scanning or using the keypad. The RF Terminal transmits the data entered -say it’s 123 - to the Base Station, which in turn transmits the following to the host: 2123+CR Where 2 is the Terminal ID, 123 is the data and CR is the termination. 6-6