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 18 of 23

DuraTrax/LaserLite, LaserLite Pro/LaserLite Mx Developer's Reference, pages 171 to 180

Pages 171 to 180 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 171

evt_badcard: '* '* evt_badcard '* description: This event occurs when the system cannot '* recognize the memory card or the card won't boot. If the '* memory card isn't formatted, then the system sets a '* global flag to indicate that the memory card was not '* recognized. On the other hand, a partially formatted card '* may not give the system any problem until the application '* attempts to send it a command. Then this routine may be '* called because of an error 05 indicating that the card '* software system didn't boot. '* cls locate 0,0 print " Card not " print " recognized "; gosub card_error_tone sleep 2000 cls locate 0,0 print " Reformat card " print " then retry "; sleep 2000 cls locate 0,0 print " running " print " application "; sleep 3000 cls locate 0,0 print " Exiting to OS " print " "; sleep 1500 running% = false% return

Chapter 5 LaserLite Mx Memory Card Data Management

163

Page 172

CARDSTATUS Function Errors The final type of error is generated by the memory card software system itself. The Videx BASIC CARDSTATUS function returns either an integer or a string value representing data. When the value of the CARDSTATUS integer return equals 0, then the given operation is considered successful and the string returned by CARDSTATUS represents data. Different commands may return different integer errors, some of which may be part of normal operations. For example, when moving the record pointer forward or backward in an indexed file, a return of 36 indicates the end of file and 37 indicates the beginning of file. In the same circumstances, a return of 23 indicates that the file contains no data. The variety of possible commands and error routines requires careful consideration of whether the error has been generated by user error or coding error. In any case, for reliable operations, it is important to check the integer return of each call to CARDSTATUS. See the Videx BASIC Manual for complete information on CARDSTATUS.

164

Chapter 5 LaserLite Mx Memory Card Data Management

Page 173

CARDSTATUS can return the following integer system errors: Error -1 -2

-3

-5

-6 -7

-8

-10 -11 -15

Description Communications with the memory card timed out. A memory card module was not detected at startup.

A memory card was not detected in the module at startup. The CRC of the return from the memory card system does not match the one calculated by CARDSTATUS. The return from the memory card is unrecognized. The designated string is too short for return from the memory card. No CARDCMD was issued since the last call to CARDSTATUS. Card is still busy when CARDSTATUS called. Card is asleep when CARDSTATUS called. The return from the memory card has exceeded the 2K buffer.

Note The memory card software system does not respond. As with the CARDCMD statement, CARDSTATUS first checks the system flags before attempting to communicate with the memory card module. Errors -2 and -3 will be returned if the system flags indicate.

System communications problem between the main CPU and the memory card module. Same as above. Dimension the string memory variable that receives data from CARDSTATUS to a larger value. This indicates a coding error. The system expects CARDCMD and CARDSTATUS to be called in pairs. The memory card software system is still processing an instruction. Removing the memory card during operations can cause this error. This should occur only with 1K data records containing ‘&’ as every 2nd character.

Chapter 5 LaserLite Mx Memory Card Data Management

165

Page 174

The following BASIC routines handle integer errors from CARDSTATUS and are included in the MX-DEMO.B source code: process_card_error: '* '* process_card_error '* description: Since the CARDSTATUS() function returns an '* integer error code, it can be quickly analyzed and '* processed with each call. '*

IF crderr% THEN 'already handled by cardcmd error processing ELSEIF (cardresult% = 0)THEN 'No error ELSEIF (cardresult% = 5)THEN 'This response can only error5% = true% 'come from firmware. It n_times% = 1 'indicates the DMS software cls 'isn't booted, perhaps locate 0,0 'because the DMS boot file print " Card system " 'is not on the card. print " error! "; goto boot_card ELSEIF (cardresult% = 32) THEN 'This error means no file is open cls locate 0,0 print " No file open! " print " "; gosub card_error_tone return ELSEIF (cardresult% = 37) 'top of file OR (cardresult% = 36) 'bottom of file OR (cardresult% = 23) THEN 'no data ELSE error_ring:

gosub card_error_tone 'otherwise just report the error number cls locate 0,0 print "Crd return error" print "# " + str$(cardresult%); sleep 3000

ENDIF return

166

Chapter 5 LaserLite Mx Memory Card Data Management

Page 175

boot_card: '* '* boot_card '* description: This routine attempts to load and run the '* DMS software on the memory card. '* cardcmd N 'Initialize the card. cardcmd B 'Send the boot command to start the DMS cardresult% = cardstatus(buffer_var$) 'software in the card. cls IF (cardresult% = 31) THEN goto evt_no_boot ELSEIF (cardresult% > 0) THEN goto evt_badcard

'If it still didn't boot, 'then perhaps the card 'isn't formatted.

ELSE gosub evt_card_interrupted 'If the boot was successful, sleep 1 'then something caused it to fail in the ENDIF 'first place. As a safeguard, the 'application should be restarted to 're-initialize pointers. return

Chapter 5 LaserLite Mx Memory Card Data Management

167

Page 176

evt_no_boot: '* '* evt_no_boot '* description: This event occurs when the memory card won't '* boot. A partially formatted memory card may not give the '* system any problem until the application attempts to send '* it a command. Then this routine may be called because of '* an error 05 indicating that the card software system did '* not boot and a subsequent attempt to boot it failed. '* cls locate 0,0 print " Memory card has " print " no boot file! "; gosub card_error_tone sleep 2000 cls locate 0,0 print " Reformat card " print " then retry "; sleep 2000 cls locate 0,0 print " running " print " application "; sleep 2000 cls locate 0,0 print " Exiting to OS " print " "; sleep 1300 running% = false% return card_error_tone: '* '* card_error_tone '* description: Tone indicating a card command error. '* sound 2349, 300 sound 1885, 600 return

168

Chapter 5 LaserLite Mx Memory Card Data Management

Page 177

Chapter 6 DuraTrax, LaserLite, LaserLite Pro and LaserLite Mx Data Files This chapter contains information on: •= The default data file. •= The Scan.S data file. •= The TimeWand II-style data file (Timewand.src).

Chapter 6 Data Files

169

Page 178

Default Data File The default data file for the DuraTrax, LaserLite, LaserLite Pro, and LaserLite Mx is similar to Figure 6-1. 10-28-99 10-28-99 10-28-99 10-28-99 10-28-99 10-28-99

09:34:28 09:40:15 09:54:55 10:22:12 10:37:32 14:56:32

00002169 00002378 01:00000004859F 87965 ABC-123 00003567

Figure 6-1 Default Data File The default data file lists the date of the entry, followed by the time of the entry, followed by the bar code data, Touch Memory button’s serial number, or keypad entry.

170

Chapter 6 Data Files

Page 179

Scan.s Data File Data transferred from a DuraTrax, LaserLite, LaserLite Pro, or LaserLite Mx programmed with the Scan.s application program, is saved as a TimeWand I/DuraWand-style raw scan file. The raw scan file can be viewed using a text editor. This file has not been formatted by a database program or by a file manager program. Figure 6-2 shows data in a raw scan file from transferring a single data collector programmed with Scan.s. Header H 19990521092700 00 0000000001 19990521091500 00 1000384 19990521091515 00 2023445 19990521091553 00 3857439 19990521091607 00 2045872 19990521091621 00 3345748 19990521091638 00 1348507 19990521091658 00 2000843 19990521091703 00 2345733 19990521091734 00 3234239 19990521091812 00 4985434 19990521091823 00 4903488 T 000

Tailer

Dat a

Carriage Ret urn

Single Space Bet ween Fields

Figure 6-2 TimeWand I/DuraWand-Style Raw Scan File Format The Header always appears as the first line in the scan file. The Header lists the unit’s ID and the date and time of the data transfer. The Tailer marks the end of the transferred data and identifies any errors in the transferring process. Each line of data between the Header and the Tailer represents individual bar code scans, keypad entries, or button reads. There is a single space character between each field in the raw scan file, and a carriage return ends each line. Chapter 6 Data Files

171

Page 180

The Header Following are the definitions for the various parts of the Header. 1.

The Header always begins with a capital H before the line of data. It indicates the beginning of the data transferred from a single DuraTrax, LaserLite, LaserLite Pro, or LaserLite Mx.

H 19990521092700 00 0000000001 2.

This indicates the year the data file was transferred.

H 19990521092700 00 0000000001 3.

This indicates the month and the day the data file was transferred.

H 19990521092700 00 0000000001 4.

This uses 24-hour time to indicate the hour, minutes, and seconds that the data file was transferred.

H 19990521092700 00 0000000001 5.

This is the source code. The source code is currently undefined in the Header but may be used in the future.

H 19990521092700 00 0000000001 6.

This is the data collector’s ID.

H 19990521092700 00 0000000001

172

Chapter 6 Data Files