The text of a manual · part 20 of 23
DuraTrax/LaserLite, LaserLite Pro/LaserLite Mx Developer's Reference, pages 191 to 200
Pages 191 to 200 of 229
The original document is the PDF (797 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 Videx DuraTrax, Videx LaserLite, Videx LaserLite Mx and Videx LaserLite Pro
Page 191
To convert a text file with the Vxcrfw.exe program, drag and drop the text file icon onto the Vxcrfw.exe program icon; a *.CRF file is automatically created. To convert a text file with the Vxcrf.exe program, run Vxcrf.exe from the command line, a *.CRF file is automatically created. See the following sections for complete information on using Vxcrfw.exe and Vxcrf.exe.
Vxcrfw.exe The cross-reference file (*.CRF) convert program for Windows is Vxcrfw.exe. Vxcrfw.exe is a Windows executable program that converts an ASCII text file (*.TXT) into a *.CRF file that can be used by a DuraTrax, LaserLite, LaserLite Pro, or LaserLite Mx without a memory card. The ASCII text file must be comma or tab delimited, have no quotes placed around records (quotes are optional around fields), no more than three description fields in addition to the key field, and saved as a text file. To use Vxcrfw.exe to convert the text file into a *.CRF file, drag and drop the text file icon onto the Vxcrfw.exe program icon. A file with a .CRF extension is automatically created. If the text file has 4 to 16 description fields in addition to the key field, you must use the DOS program Vxcrf.exe to convert the file. See the following page for information on using Vxcrf.exe.
Chapter 7 Cross-Reference File Convert Programs
183
Page 192
Vxcrf.exe The cross-reference file (*.CRF) convert program for DOS is Vxcrf.exe. Vxcrf.exe converts an ASCII text file into a *.CRF file that can be used by a DuraTrax, LaserLite, LaserLite Pro, or LaserLite Mx without a memory card. The advantage to using Vxcrf.exe is that it can convert a cross-reference file with up to 16 description fields, in addition to the key field; whereas, the other convert programs are limited to three description fields. The ASCII text file must be comma or tab delimited, have no quotes placed around records (quotes are optional around fields), and no more than 16 description fields in addition to the key field. If more than three description fields are required, it is necessary to use the -v parameter in the command line. With three or fewer fields, the -v parameter is optional. The syntax for the command line is: vxcrf [-v<number of fields>] filename.txt where filename.txt is the name of the text file and the -v parameter indicates the number of description fields (in addition to the key field) in the filename.txt file. Vxcrf.exe creates a file filename.crf that can be used as a cross-reference file by a DuraTrax, LaserLite, LaserLite Pro, or LaserLite Mx without a memory card. The following steps describe how to: •= convert a text file (*.TXT) into a *.CRF file, •= edit the application source code file to include the *.CRF file, •= compile the edited application source code file, •= and transfer the compiled application and *.CRF file to the data collector.
184
Chapter 7 Cross-Reference File Convert Programs
Page 193
1.
Create a comma-delimited or tab-delimited ASCII text file (*.TXT) in the format: Key<delimiter>Field1<delimiter>Field2<delimiter>...FieldN<cr/lf> where Key is the data matched to the user input and Field1 through FieldN are the description fields. Field1 through FieldN are optional, but do not have more than 16 fields in addition to the key field. Note: If using tab delimiters, use a text editor that preserves tab characters (for example, Notepad or Wordpad, but not MS-DOS text editor). 2.
To convert the text file into a *.CRF file, run Vxcrf.exe from the DOS command line: vxcrf [-v<number of fields>] filename.txt where the -v parameter indicates the number of description fields in the filename.txt file, in addition to the key field. If the number of description fields is three or less, the -v parameter is not necessary. The number of description fields cannot be greater than 16. This program will create a file filename.crf, which is a cross-reference file that can be used on a DuraTrax, LaserLite, LaserLite Pro, or LaserLite Mx without a memory card.
3.
To use the *.CRF file in your application, open the application source code file (.B extension). Note: The application source code file is created when you choose Export Binary or Export Source Only from the Application Builder’s File menu. See the Export Binary command section in the Application Builder Manual for information on creating the source code file.
4.
In the application source code file, open the *.CRF file using the following syntax: OPEN filename$ FOR REFERENCE AS #filenumber% The filename$ is the name of the *.CRF file; it must be all uppercase and enclosed in quotes. The filename$ must be the same name used in Step 2 previously (with the .CRF extension). The filenumber% must be a number between 0 and 31 that has not been used as the filenumber% in another OPEN statement. Chapter 7 Cross-Reference File Convert Programs
185
Page 194
It is recommended that the ERR function (which returns the most recent error condition) be called immediately after attempting to open a *.CRF file. For example: open "FILE1.CRF" for reference as #1 if err then gosub crf_error endif
See the Videx BASIC Manual for more information on the BASIC statements and functions. 5.
In the application source code, you can find a record in the *.CRF file with a specified key field using the syntax: rec% = LOOKUP (filenumber%, strexpr$) where strexpr$ is the key field and filenumber% is the number that was used in the OPEN statement to open this *.CRF file. Each record in a *.CRF file is assigned a unique number from 1 through n (where n is the number of records in the file). This unique number is returned from LOOKUP. The records are not necessarily stored sequentially, so do not assume that rec% corresponds to the row number in the *.CRF file. If the data string strexpr$ is not found, LOOKUP returns 0.
6.
Following a successful call to LOOKUP within the source code, the data can be retrieved from the *.CRF file using the syntax: fieldDesc% = LOOK$ (fieldnum%) where fieldnum% is the field value to be returned. If fieldnum% is 0, the key field itself is returned. If it is between 1 and 16, the corresponding data string from the *.CRF file is returned. If it is any other value, the results are unpredictable.
186
Chapter 7 Cross-Reference File Convert Programs
Page 195
7.
After making any changes to the application source code file, it must be compiled before it can be used on a data collector. To compile the application, use Vxbasic.exe using the following syntax: vxbasic filename.b where filename.b is the name of the application source code file (.B extension). The application is compiled and saved as an object file with a .S extension. (Note: If Vxbasic.exe encounters any errors in the application source code file during the compile process, it stops and displays the error and source code line on the screen.)
8.
Transfer both the compiled application source code file (*.S) and the *.CRF file to the DuraTrax, LaserLite, LaserLite Pro, or LaserLite Mx without a memory card using the syntax: DOWNLOAD [cmd.txt] [app.s] [REF.CRF] [sys.os] [-pn] [-dn] [-f1] where cmd.txt is the commands file (optional); app.s is the compiled application; REF.CRF is the *.CRF file and must be in all UPPERCASE letters; sys.os is the operating system (optional unless unit has been reset to monitor mode); -pn specifies the serial port (1–4; default is 1); -dn specifies the IR configuration (0 for Base Station or built-in IR transceiver, 1 for JetEye). The -f1 parameter is only used if you want to transfer the application to the flash memory of the LaserLite Pro or LaserLite Mx. It is possible to transfer multiple *.CRF files using Download.exe; the filenames must be separated by spaces. The application must be loaded each time a *.CRF file is loaded, even if only the *.CRF file changes and the application itself has not. Both files must be included in the Download.exe command. See the Download for DOS section on page 10 for more information.
Chapter 7 Cross-Reference File Convert Programs
187
Page 196
Cross-Reference File (*.CRF) Notes If you have difficulty using a *.CRF file in the data collector, check the following: •= If using tab delimiters, create the text file for the *.CRF file using a text editor that preserves tab characters (for example, Wordpad or Notepad, but not MS-DOS text editor). •= Use Vxcrf.exe or Vxcrfw.exe to convert the text file into a *.CRF file. •= If the *.CRF file has more than three fields, in addition to the key field, use the -v parameter in the Vxcrf.exe command line. •= Both in the OPEN statement in the application source code file and in the DOWNLOAD.exe command string, refer to the *.CRF file using all uppercase letters. •= Transfer both the application and the *.CRF file into the data collector, even if only the *.CRF file has changed. •= If the *.CRF file will not transfer to the data collector, verify that the *.CRF file contains data and is not empty. The communications programs will not transfer an empty *.CRF file.
188
Chapter 7 Cross-Reference File Convert Programs
Page 197
Chapter 8 Theory of Operation This chapter contains information on: •= The operations of the DuraTrax, LaserLite, LaserLite Pro, and LaserLite Mx.
Chapter 8 Theory of Operation
189
Page 198
Theory of Operation Overview The DuraTrax, LaserLite, LaserLite Pro, and LaserLite Mx operate on four AA alkaline or nickel-cadmium batteries. Input voltage can vary from 4 to 6 volts (V) under full load (90 mA). A linear regulator converts the battery voltage to +3.3 V. The processor is an 8051 type. Clock and RAM are backed up with a 3 V lithium battery. A boot loader (monitor program), residing in the processor ROM, handles program loading from the IR serial link. All four units use similar CPU boards, but different scanner boards. The DuraTrax has a contact scanner and the LaserLite, LaserLite Pro, and LaserLite Mx have a laser scanner. Each unit has a nose board in the head of the device for the LEDs, lithium battery, and beeper. Some of the I/O functions available for applications are: Real-time clock (RTC), analog-to-digital converter (ADC) for battery, Touch Memory button contact, contact bar code reading, LEDs, beeper, serial communications, display, keyboard, and power management.
Power Up Sequence With batteries installed (greater than 4.0 V) and lock switch ON, a wakeup from a keypress or Touch Memory button contact resets the CPU. The processor initiates a power-on sequence and then executes code from the XRAM (external RAM). The program sets up all latches as required. A search is carried out to determine the required action: button contact, keypress (scan or scroll), or serial communications. The LCD is activated to display human readable characters.
190
Chapter 8 Theory of Operation
Page 199
Battery Monitoring Battery conditions can be monitored by the ADC so that a low-battery alert is implemented by the software. For alkaline batteries this would be 4.5 to 4.0 V. Different battery chemistries (such as, alkaline or NiCad) may affect the threshold chosen. Both the default application and the application templates begin issuing low voltage warnings at 4.8 volts. More aggressive warning messages are triggered at 4.5 volts. This provides a 0.9 V margin above the operation cut-off for batteries that have greater than normal internal resistance. A power-fail indicator monitors the battery source. It sends an interrupt to the CPU if the source falls below 3.6 V. At this point, the scanner circuits may experience reduced reading performance. If required, a CPU/RAM cleanup can be completed before shutting down. The CPU should always be prepared for the eventual loss of power from battery removal before entering STOP mode. A power failure will not wake up a sleeping CPU. A hardware-reset circuit monitors the low-battery alert (VCC). Should the battery voltage fall below where the CPU and RAM operate, at about 3 V, the CPU is placed in reset and the RAM Chip Select line is deactivated.
Power Down Sequence Operating system software places all devices in low-power modes before entering STOP mode of the CPU. These include scanner, LCD, IR, and LEDs.
Boot Loader (Monitor Program) Boot loader residing in processor ROM allows update of the RAM from the IR port. See Chapter 2 for more information on the monitor program.
Communications Communications for transferring software and data is through the IR port. Chapter 8 Theory of Operation
191
Page 200
Memory Access (Refer to the System Memory Map Diagrams on pages 48–50.) RAM: 128K x 8 bit (LaserLite and DuraTrax) 256K x 8 bit (LaserLite Pro and LaserLite Mx) MEMORY MAP Data and program space not segregated. A15 = Low A0–A14 Access base 32K block. A15 = High A0–A14 AD15, AD16, AD17 select one of 32K blocks. If both IOSEL1 and A15 High, A4 and A5 select I/O device to Read or Write. Note: If both IOSEL1 and A15 High, No DATA or PROG access to RAM, reserved for I/O space only. To access latch (LEDs, beeper, etc.), keyboard, LCD. Program execution from the base 32 KB.
Times (Note: The times are approximate values.) Battery removal VCC holdup time (Time from power fail to reset) Reset duration from sleep mode initiated by key activity Power cycling reset RAM access time maximum
1 mS 40 mS 250 mS 100 nS
Currents (Note: The currents are approximate values.) CPU Stop Mode with all devices OFF CPU Idle Mode with LCD ON CPU Run Mode with Scanner ON
192
Chapter 8 Theory of Operation
800 µA 8 mA 80 mA