The text of a manual · part 4 of 8
Apex II Portable Data Collection Terminal Operations & Programming Manual, Part 1: User's Manual, pages 28 to 36
Pages 28 to 36 of 71
The original document is the PDF (342 KB). 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 Compsee Apex II
Page 28
Note If you attempt to scan a bar code when the buffer is full, the terminal will give ten short beeps. Press <ALT> <Z> to temporarily clear the buffers.
COMPSEE BASIC INTERPRETER OPERATING SYSTEM
3
This section details the Apex II's operating system and defines its characteristics and functions. It describes how to determine your operating system's version number and provides instructions for loading a new operating system from the PC using the Linkmaster.exe program.
Apex II BASIC INTERPRETER OPERATING SYSTEM The Apex II BASIC Interpreter Operating System is a program written in 80196 Assembly Language by Compsee. A version of this program is resident in all Apex II terminals and is responsible for controlling all of its activities. After a BASIC application program is loaded and executed within the terminal, the operating system becomes a slave to this program. The BASIC program tells the operating system which functions it needs to perform. BASIC, and all other languages are simply multi-instruction, user friendly, command sets that allow you to control a device through its base operating system. Like operating systems on all other computers, the Apex II BASIC operating system has commands that allow direct manipulation of its functions. For example, if you wanted a directory listing of files in the Apex II's memory, you do not have to write a BASIC program to view the listing. You would simply send the DIR command to the RS-232-C port and the desired information will be returned via the RS-232-C port.
OPERATING SYSTEM FUNCTIONS The operating system has two main functions: fundamental operating tasks and program loading. These functions are described below.
Fundamental Operating Tasks The operating system performs the following operating functions as background tasks:
•
Provides the interface to activate the Scan Key or Laser Scanner
•
Bar code analysis, discrimination, and decoding
•
Interface to input/output port (RS-232-C)
•
Manages the command interpreter for syntax and data file definition rules for n n n
Loading programs Loading data files Dumping data files
•
Memory storage for successive bar code reads, application programs and data files.
•
Manages the LCD display
•
Low power monitoring of battery pack
Compsee, Inc. Apex-0698-Part 1: User’s Manual
28 Part 1
Page 29
•
Generation of audible and visual alarms
•
Power control
•
Keypad operation
Program Loading The operating system is also responsible for administering the tasks required for loading application programs, 80196 Assembly routines, and data files. One of these tasks includes maintaining a record of the memory addresses of the application program and data files. The terminal's memory is divided into five major areas. The bottom portion of memory is reserved for the operating system parameters and its buffers (approximately 24k). The top portion of memory is reserved for the application program, variable storage area, and the storage area necessary for the data files. The amount of available memory depends on the memory size of your terminal 128 KB, 512 KB or 1 Meg).
OPERATING SYSTEM CHARACTERISTICS The characteristics and functions of the operating system are common to all applications and operate independently of the customized application program. This is due to the fact that these characteristics and functions are resident in the non- alterable firmware known as the COMPSEE BASIC Interpreter Operating System. To help make it easier for you to take advantage of enhancements to this operating system, the Apex II terminal has been designed to support an upgrade method which allows a new operating system to be loaded into the terminal via the RS-232-C port. The Apex II terminal is manufactured with the COMPSEE BASIC Interpreter Operating System stored in FLASH.
Note Loading a new operating system into an Apex II terminal will cause the Apex II to reboot. Rebooting erases your program and all of your data files. Make sure that you have saved your data and have another copy of your program before rebooting the Apex II or loading a new operating system.
DETERMINING THE OPERATING SYSTEM VERSION It is important to know which operating system is resident in the Apex II terminal since Compsee is constantly improving its features. Because the Apex II has been designed to have a FLASH-based operating system, our users will be able to take advantage of enhancements to the COMPSEE BASIC Operating System after their original purchase. To determine which version of the COMPSEE BASIC Operating System is resident in your scanner: 1.
Place the scanner in the IMMEDIATE mode. (If you are not familiar with the Apex II's operating modes or how to get to and from each of these modes of operation, please consult Section 2.)
2.
Once the scanner is in the IMMEDIATE mode, press the <ALT> key and the letter <V> (alphanumeric keypad). The Apex II's display will show the current version number of the operating system.
Compsee, Inc. Apex-0698-Part 1: User’s Manual
29 Part 1
Page 30
Note Access the Compsee Bulletin Board Service (instructions are provided in Chapter 7), or contact your Compsee dealer for the latest operating system release. It is recommended that all Apex II terminals be upgraded when a new operating system becomes available from Compsee. This will ensure that all terminals take advantage of operating system enhancements.
A NEW OPERATING SYSTEM When Compsee releases an updated operating system, it will be made available to the general public on the Bulletin Board Service and through a direct mailing to the registered resellers. If you receive your new operating system from your Compsee Reseller, it will be contained on the Operating System diskette or a Utility diskette. The File is Apexos.x, where x identifies the hardware revision, currently at A. Loading a new operating system requires the following: 1. 2. 3. 4. 5.
Apex II terminal be in IMMEDIATE mode Baud rate = 9600 Even parity 7 data bits and 1 stop bit The Mode set to 5,3
Compsee ships a program named Linkmstr.exe with the Apex II. Linkmstr.exe was developed in an MS-DOS environment. It can only be used on a PC running under DOS. If you do not have access to the MS-DOS environment, contact your Compsee dealer. The operating system load procedure is described in the topics that follow. Refer to Section 6, Compsee Support, if you are using the BBS to load a new operating system. To assist during the install process, an error checking interface is provided. Self-explanatory messages providing corrective action(s) will appear. Should you experience problems, simply follow the directions that appear on the PC's screen. Before attempting to install the new operating system on your Apex II, the text files should be printed, read, and understood. Some of these changes may affect the way your program operates. Therefore, it is important that you read and understand the information. To print the documents (on a parallel printer), you will first need to install the Linkmaster.exe programs and files onto your PC's hard disk (instructions can be found under the To Load a New Operating System topic shown later in this chapter). Do the following to print the text files: 1.
Ensure that your printer is connected to your PC's parallel port.
2.
Type CD \Apexware and press <Enter>.
3.
Type COPY *.001 LPT1: and press <Enter>.
Compsee, Inc. Apex-0698-Part 1: User’s Manual
30 Part 1
Page 31
While you are loading the new operating system the following will be displayed on the PC screen: File
Apex
Setup
Quit
LinkMaster Utilities for the Apex II Ver 1.0 Compsee, Inc. 1995 (C) This program provides a list of utilities to assist in using the Apex II handheld computer. Please use your arrow keys to select a menu choice.
01-09-1996 08:58:00 Establishing communications.........please wait Current version in Apex II: v1.01a Updating Apex II operating system v1.01a with disk 1.02 ..............................................
To Load a New Operating System Prior to beginning the operating system install, you must first install the Linkmaster.exe program onto your PC's hard disk as described below. This will cause a Apexware directory to be created. The files will be copied to this directory. 1.
Insert the Apex II Utility diskette into drive A.
2.
Type A: and press <Enter>.
3.
Type INSTAL and press <Enter>.
4.
Your DOS prompt will display when all files have been copied.
Note If you add these directories to your DOS path, you will be able to run Linkmaster.exe from any directory located on your hard disk. The Linkmaster.exe program's files will appear on the PC's screen as they are being installed onto the hard disk. A standard listing and descriptions of the files follow: LINKMSTR.EXE
A compiled QuickBASIC 4.5 program that will assist in loading the new operating system. Linkmaster.exe is also used to load programs and data files to the Apex II, as well as retrieve data files from the Apex II.
Apexos.x
Apex II terminal operating system for Apex II terminals. X identifies the hardware revision, currently at A.
V102FIX.001
Text file (document) describing enhancements and operational changes to the operating system.
READTHIS.DOC
Text file (document) describing installation of the new operating system.
Compsee, Inc. Apex-0698-Part 1: User’s Manual
31 Part 1
Page 32
Note Different control boards may contain different hardware. The differences may be due to design improvement, cost reduction, etc. Depending on the Apex II's control board, the operating system will load the appropriate file. To begin the operating system upgrade, do the following: 1.
Type CD \Apexware and press <Enter>.
2.
Type LINKMSTR and press <Enter>.
3.
Select Setup and set the Correct Communications Port.
Note Rebooting erases all program and data files. If this is not a first time operating system install, make sure that you offload any data before rebooting the Apex II. 4.
Connect your Apex II terminal into your PC's serial port using the appropriate Compsee cable (consult Section 12). If the cable you are using was not manufactured by Compsee, ensure that the pin assignments match those shown in Section 10.
5.
Use the arrow keys to select the File option and press <Enter> .
6.
Select Download OS and Press <Enter>. Check the Apex II's LCD to ensure that the following message is shown: Version 1.02 Has Been Loaded
Then, press <ALT> and <V> to view the new operating system version number. To return to DOS, select Exit from the Apex-BASIC Operating System Loader screen.
Note The version number shown above is provided for purposes only. Your version number may be different.
TROUBLESHOOTING THE LINKMSTR PROGRAM Contained within the Linkmaster.exe program is a user friendly error checking interface that will display self-explanatory error messages and prompts when something goes wrong. Follow the directions that appear on the PC's screen should you experience problems running the demo. Other error situations are provided below. To use these troubleshooting procedures, locate the problem you are experiencing and follow the instructions provided in the Action column. PROBLEM
ACTION
Communications with the Apex II terminal cannot be established.
Check that the RS-232-C cable is securely connected to the Apex II terminal and the correct port on the PC, the Apex II terminal is powered on, in IMMEDIATE mode (see Section 2), and the baud rate matches the one being used on your host (refer to the MODE command information provided in Section 2), or if you are not using a Compsee RS-232-C cable and have not verified that it works, check the pin assignments (see Section ). This step will rule out interconnect problems.
A message is shown stating that file(s) are missing.
Compsee, Inc. Apex-0698-Part 1: User’s Manual
Obtain a new copy of Linkmaster.exe from your reseller or from the Compsee BBS (see Section 6 for BBS information).
32 Part 1
Page 33
4
BUILDING YOUR APPLICATION
This chapter discusses the process of writing the applications that are used to program the Apex II terminal for your specific data collection purposes. After your application is developed, it must be uploaded to the Apex II. Also provided are the steps necessary for performing the upload operation. The information provided in this chapter is directed to the applications programmer. Now that you have completed Chapters 2 and 3, you are ready to develop your own application. This chapter provides guidelines that explain how to:
•
Create data collection programs on the PC.
•
Upload the programs and data files to the Apex II terminal.
•
Collect data with the terminal.
•
Download the collected data to a PC.
•
Process data.*
*Note All commands and program lines are sent to the Apex II and PC in ASCII format. When processing data, ASCII format may be used on the PC. Prior to processing on a mainframe, you may need to convert the data to another format, such as EBCDIC. Problems may be encountered if old programs and data files are not deleted prior to loading a new program. This chapter also provides the instructions required to delete these items.
BUILDING THE APPLICATION Before you begin to build your application, you will need the following items: • A computer which has a RS-232-C port and a text editor,
•
The Apex II LinkMaster Utility Programs (these programs were loaded into your PC during installation of LinkMaster diskette as described in Section 3.
• •
Apex II terminal that is connected to a host computer, and Communications software, such as CrossTalk, PROCOMM+, or communications software written specifically for your company.
Using the information provided in this section you will learn to build your application. You will be using the Apex II LinkMaster utility programs to upload and download programs. The upload and download tasks could also be accomplished using a pre-packaged communications package such as PROCOMM+ or CrossTalk. Alternately, you could write your own upload and download programs. Until you become accustomed to how the Apex II operates, it is recommended that you use the LinkMaster programs or one of the recommended pre-packaged software programs mentioned above. Before loading the application programs into the terminal, you should be aware of the following prerequisite information: 1.
The terminal must be in IMMEDIATE mode as described in Section 2.
2.
Line numbers must precede each line of the program.
Compsee, Inc. Apex-0698-Part 1: User’s Manual
33 Part 1
Page 34
3.
Any existing programs or data files must first be deleted before loading a new program. Otherwise, old programs whose line numbers do not correspond to the new programs will be combined with these in the new program; new data files could potentially contain data that was previously contained in the old file with the same name. Instructions for prepping the Apex II prior to a program load are located at the end of this chapter.
4.
The Apex II uses an interpreter not a compiler. As a program is being loaded, the interpreter will verify the program's syntax and display messages for any detected errors.
5.
All commands and program lines must be sent to the Apex II in ASCII format. Each command or program line must be terminated by the carriage return and line feed character.
Create the Program Write your data collection program on the host computer using COMPSEE BASIC programming language in a text editor. In writing your program, you should understand and adhere to the syntax rules outlined in the COMPSEE BASIC Interpreter Programmer's Manual.
Prepare the Apex II for the Program Load Prior to a new program load, you will need to delete any existing programs, files, or Assembly routines. Refer to the Prepare the Apex II for a Program Load topic located at the end of this section for instructions.
Upload the Program to the Apex II Using the Apex II Program Loader After your application program has been written and the Apex II prepared for a program load, the application program must be uploaded from the host system to the Apex II terminal. Uploading is the process of sending information from a host (PC in our example) to the Apex II terminal. The program loading guidelines provided in this topic use the Apexprog.exe program and ApexTrak.apx programs. An explanation of the flow exchange between the PC and an Apex II terminal is provided below. This explanation is only one of many methods of getting data/programs to and from the Apex II. It is not our intention to indicate that this method is the only correct way of performing this communication process. In fact, there are a number of ways of initiating communications with the Apex II, and if written properly, can be acceptable methods. The Apexprog.exe program allows you to load a program into an Apex II terminal from DOS. QuickBASIC source code is provided with this program. To use the Apexprog command: 1. Connect the Apex II to the PC's serial port (COM1 or COM2). 2. Change to the directory where the Apexprog.exe program resides. 3. Type the Apexprog command in the following format: Apexprog [1],[K],[D],[O],[ApexTrak.apx],[R],[S],[C],[L] The format includes nine optional parameters that can follow the Apexprog command in any order. Commas or spaces may be used as delimiters.
Compsee, Inc. Apex-0698-Part 1: User’s Manual
34 Part 1
Page 35
The following list describes optional parameters that can be used with Apexprog.
Parameter
Function
[1] [K] [D] [O] [file name] [R] [S] [C] [L]
Comm. Port Kill Apex II files Set Apex II date/time Load new operating system Load Apex II BASIC program named Run Apex II BASIC program in memory Save Apex II Program into the Flash Strip comments from Apex II BASIC program lines Add line numbers to program as it’s being loaded
An example of parameter usage is provided in the following Apexprog instructions. Apexprog K,D,O,ApexTrak.apx,R,S,C,L This Apexprog command tells the system to: K
Kill existing files in Apex II's memory
D
Set Apex II date and time according to PC's date and time
O
Open and establish communications on COM1 filename
Load the file named ApexTrak.apx and strip comments from program
R
Issue the RUN command to the Apex II terminal
S
Save the Apex-Trak program to Flash
The information provided in the following table is organized in a manner that defines the activities occurring on both the PC and the Apex II. PC Phase 1a
Use approved cable to connect the Apex II to the PC.
2
Open Comm. port and set mode settings to 9600,E,7,1. (This is the default setting of the Apex II after it has been rebooted.)
3a
Send a CRLF (carriage return/line feed) out of the RS- 232-C port and wait for the Apex II to respond.
Apex II Phase 1b
Reboot Apex II and ensure that it remains powered on so that the PC can establish communications.
3b
If the Apex II is in the IMMEDIATE mode, it will detect something being sent to its COMM port. The CRLF sent by the PC will force the Apex II to send out a > character. If the Apex II is not in the IMMEDIATE mode, it will not acknowledge the CRLF. The host system will record this lack of response after so many seconds (as determined by the host system's application program).
Compsee, Inc. Apex-0698-Part 1: User’s Manual
35 Part 1
Page 36
PC Phase 4
Apex II Phase
PC acknowledges the Apex II's response. If the Apex II does not respond, then your host program can be set up to attempt other mode setting(s). If this is the case, repeat steps 2 through 4. If the Apex II does not respond after attempts to use the other settings, go to an error trapping routine which will display a message indicating a communications error has been detected. The user must secure the cable and ensure that the Apex II is powered on. At this point the PC program will return to the Main Menu. (Start the procedure again from Step 1a after following directions printed out in error message.) The Apex II returns the >, then displays a message that communications have been established. The PC program, having received the >, is set up to detect that the Apex II is in the IMMEDIATE mode.
5a
The Apex II has responded to the CRLF, the PC can send the NEW command to clear out any program in the terminal. The PC application program is designed to wait a few seconds for the Apex II to respond to the NEW command.
5b
If the Apex II is in the IMMEDIATE mode, it will execute the NEW command.
6a
The PC can begin sending the program to the Apex II 6b line by line. It will pause briefly after each line and check its COMM port to ensure that the Apex II has received the line (> will be returned).
The Apex II is receiving and storing the information being sent (because it is preceded by a line number). The Apex II will send the > character from its COMM port because of the CRLF which follows each program line. In Apex-Trak, we take advantage of this > character by using it as an acknowledgment of receipt for each program line being sent.
7a
After all program lines are sent, the PC program will send the SAVE command.
The Apex II receives the SAVE command and moves the program from Ram to Flash. The > is then sent back to the PC.
The PC program will then send the RUN command to the Apex II
Compsee, Inc. Apex-0698-Part 1: User’s Manual
7b
The Apex II executes the program which it has just received, The user can begin the process of collecting data.
36 Part 1