The text of a manual · part 8 of 23
DuraTrax/LaserLite, LaserLite Pro/LaserLite Mx Developer's Reference, pages 71 to 80
Pages 71 to 80 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 71
Load from Flash (OS versions 1.22 or later, LaserLite Pro and LaserLite Mx only)
The Flash command is an F with no arguments. Since this command clears data on the LaserLite Pro and the LaserLite Mx, it must be sent three times. In operating systems 1.22 or later, this command instructs the monitor program to check the unit’s flash memory for a valid image file (*.IMG) and, if found, load that image file into RAM. Any data is destroyed, and any application previously in the LaserLite Pro or LaserLite Mx is overwritten. If this command is executed on a DuraTrax or LaserLite (OS versions 1.22 or later) it behaves exactly like the Q (quit) command. It does not destroy data on the DuraTrax or LaserLite. Go
The Go command is a G with no arguments. This causes the current BASIC application to be executed. Unlock
The Unlock command is an I (for identify) with one argument. The argument is either the unit’s ID or ten zeros. Ten zeros will unlock any Videx data collector. The I (Unlock) command must be terminated with only a carriage return, not a carriage return/line feed combination. Both the BASIC application and the command line respond to this command. If an I (Unlock) command is sent to the BASIC application, an exit event is returned the next time INPUTEVT is called. In this case, there must be a delay of at least 500 ms between sending the command and calling INPUTEVT without any other characters being sent. The BASIC program should typically respond to an exit event by ending the program. If an Unlock command is used without an argument, it responds with the system version and unit ID. (This is the same information that is displayed when the command line is first entered.) If an I is received, but the argument doesn’t match ten zeros or the unit ID or if it is terminated with a carriage return and linefeed, then the data collector immediately executes the G command. This prevents two units from being unlocked at the same time. The I command must be terminated with only a carriage return, not a carriage return-line feed pair. Chapter 3 Operating System Software
63
Page 72
Lock
The Lock command is an L with no arguments. It causes the data collector to go to sleep immediately. When the unit is awakened, it executes the BASIC application. Message
The Message command is an M, followed immediately by either a 1 for the top line of the display or a 2 for the bottom line, followed by one argument. The argument is written to the display, starting at the beginning of the indicated line. Pass to Memory Card (LaserLite Mx only)
The Pass to Memory Card command is a P followed by a command string. The command strings are the LaserLite Mx memory card command set; these are the same commands that are used in the Videx BASIC CARDCMD statement’s command_str$ parameter. See pages 105–129 for information on the Pass to Memory Card command strings. Quit Operating System
The Quit Operating System command is a Q with no parameters. It causes the operating system in the data collector to stop executing and restarts the monitor program. This command neither destroys data nor removes the application. To restart the operating system, enter G 7FFB at the monitor command line. Receive
The Receive command is an R with no arguments. Since this command clears data it must be sent three times. It causes the data collector to start receiving a new application using the YModem protocol. Any data contained in the data collector is destroyed. The YModem protocol is XModem CRC, with optional 1K packets, and batch extensions. (Some communications programs claim to implement YModem, when they really just implement one or two extensions to XModem.) If the application is not successfully received, the D command is executed and the default application, if present, is installed. If the application is successfully received, it is installed as the current application. 64
Chapter 3 Operating System Software
Page 73
Send
The Send command is an S with no arguments. It causes the data collector to start sending the data file using the YModem protocol. The name of the data file is the same as the name last used by the BASIC application to open it. Time
The Time command is a T with one optional argument. If the argument is supplied, it must be in the form: MM DD YY hh mm ss (Note: The spaces are optional.) The data collector’s clock is changed to the given time. With or without the argument, it responds with the current time in the form: MM-DD-YYYY hh:mm:ss. Reset Memory Card
The Reset Memory Card command is an X with no arguments. It restarts the memory card system if it stops because the card was removed. Listen for Response from Memory Card
The Listen for Response from Memory Card command is a Y with no arguments. It watches the data stream coming from the memory card until it receives a carriage return. Then it captures any incoming data until it receives a second carriage return. It times out in two seconds in the absence of a carriage return. This special command is used for monitoring progress when formatting a memory card. See Appendix B for information on formatting the memory card. Clear Data
The Clear Data (zap) command is a Z with no arguments. Since this command clears data it must be sent three times. It causes the data file’s size to be set to 0. Any data is destroyed.
Chapter 3 Operating System Software
65
Page 74
Default.s Application The DuraTrax, LaserLite, and LaserLite Pro are shipped with an application called Default.s installed. The Default.s application allows entry of any data and transfers the data as a formatted file that includes the entry and the date and time of each entry. Vxcom or Download will automatically load the Default.s application into a DuraTrax, LaserLite, or LaserLite Pro if another application is not listed on the command line along with the operating system. The Default.s application and the Default.b source code are located on the disk accompanying this software package. The following tables describe the variables and sounds used by the Default.s application. Default Application Variables
Variable
Description bar$, bar2$
Temporary string variables used at various points in the program.
data$
64-character string containing data that was read by unit. Initialized to null string. Obtains value from INPUTEVT statement.
delimiter$
Delimiter between lines of the data file. Set to <cr><lf>.
device%
Parameter returned by INPUTEVT indicating type of device that entered the input data. Returns a 1 for keyboard, 2 for laser, 12 for contact scanner, 48 for touch button, or 64 for application generated (not possible with Default.B). Program does nothing with device% except for checking whether user has pressed the LaserLite Pro’s ENT (Enter) key without entering any data, in this case, entry is ignored and unit sounds a single low beep.
display$
Character string containing characters displayed on unit. Initialized to null string.
foo%
Temporary parameter used at various points in the program.
full_display$
String containing complete input data. Used by scroll left and scroll right routines.
high%
Current size of data file in high bytes (multiples of 32768). Used when deleting the most recent data entered.
66
Chapter 3 Operating System Software
Page 75
Variable
Description info_index%
Index used when cycling through display of various system parameters.
low%
Current size of data file in low bytes (modulo 32768). Used when deleting the most recent data entered.
mode%
Flag indicating mode. Set to 0 for normal, 1 for scrolling up, and 2 for scrolling down.
mode_dn%
Setting for scrolling down the file or scanning. Set to 2.
mode_norm%
Setting for having scrolled up to the top or down to the bottom of the file. Set to 0.
mode_up%
Setting for scrolling up through the file. Set to 1.
nbytes%
Number of bytes to delete from the data file when deleting the most recent data entered.
ri%
Loop index used when alerting user to error opening data file.
running%
Flag indicating whether to keep running program. Set to 1 (or true%) while running; set to 0 (or false%) when unit receives I (Unlock) command at serial port.
shift%
Index used to control display during scroll left and scroll right routines.
symbol%
Parameter returned by INPUTEVT indicating bar code symbology of input data. Returns a 1 for Code 39, 2 for UPC-A or UPC-E, 4 for Interleaved 2 of 5, 8 for Codabar, 16 for EAN, 64 for UCC Code 128, or 128 for Code 128. The default application does nothing with this value.
Chapter 3 Operating System Software
67
Page 76
Variable
Description type%
Parameter returned by INPUTEVT indicating type of input event. Returns a 1 for input, 2 for exit, 3 for scanning a 5-space bar code that will delete the last input), 4 for scroll up key, 5 for scroll down key, 6 for power off switch, 7 for unexpected power loss, 8 for ESC key, 9 for scan button pressed and released, 10 for no memory card module found, 11 for no memory card found, 12 for unknown memory card found, 13 memory card ID has changed, 14 for memory card processor interrupted, 18 for scroll left key, 19 for scroll right key, 20 for MEM key, 21 for BAT key, 22 for f1 key, 23 for f2 key, 24 for f3 key, 25 for f4 key, or 26 for f5 key. (The LaserLite Mx recognizes all of these events, the LaserLite Pro recognizes events 1–9 and 18–26, and the LaserLite and DuraTrax recognize events 1–7 and 9.)
voltage%
Current battery voltage.
volt1%, volt2%
Battery voltage thresholds that trigger low voltage warnings.
68
Chapter 3 Operating System Software
Page 77
Default Application Sounds
Description of Sound
Code
Event
Single click sound 1397, 10
A key was pressed.
Single high beep sound 1446, 250
Good input accepted (good beep).
Single low beep sound 698, 250
Enter (ENT) key pressed without any data entered.
Two beeps: high, medium sound 3620, 150 sound 2349, 250
Most recent data deleted.
Two beeps: medium, high sound 2349, 150 sound 3620, 250
Confirm that most recent data is to be deleted.
Three beeps: high, low, high sound 2793, 250 sound 2637, 250 sound 2793, 250
Begin default application (startup beep).
Three beeps: high, medium, low sound 1760, 250 sound 1568, 250 sound 1397, 250
Exit default application (exit beep).
Chapter 3 Operating System Software
69
Page 78
LaserLite Mx MX-DEMO Application LaserLite Mx is shipped with the MX-DEMO application installed. MX-DEMO allows entry of any data and stores each scan with date and time as a single, tab-delimited record. MX-DEMO is also on the 2MB and 4MB memory cards sold by Videx as part of the CPU boot file. The application (MX-DEMO.S) and its source code (MX-DEMO.B) are included with the disk accompanying the LaserLite Mx software package. The following table lists the memory variables and sounds used by the MX-DEMO application. MX-DEMO Application Variables Variable
Description bar$, bar2$
Temporary string variables used at various points in the program. 256-character string used capture the version string from the card in the init_card routine. 256-character string for capturing data sent by the memory card processor using the CARDSTATUS() function. 256-character string for building a command with parameters to pass to CARDCMD. String variable dimensioned for capturing memory card status string. Not implemented with this version of MX-DEMO. File handle number of the currently open data file on the memory card. Used as a shorthand way to switch between files. String to hold number of free Kbytes on memory card. Used in evt_mem routine. 64-character string containing data that was read by unit. Initialized to null string. Obtains value from INPUTEVT statement.
buffer_var$ cardreturn$ crdcmd$ cstatus$ chandle$ card_space$ data$ device%
70
Parameter returned by INPUTEVT indicating type of device that entered the input data. Returns a 1 for keyboard, 2 for laser, 12 for contact scanner, 48 for touch button, or 64 for application generated (not possible with MX-DEMO.b). Program does nothing with device% except for checking whether user has pressed the ENT (Enter) key without entering any data, in this case, entry is ignored and unit sounds a low beep.
Chapter 3 Operating System Software
Page 79
Variable
Description dhandle$
File handle number of the data file on the memory card.
display$
Character string containing characters displayed on unit. Initialized to null string.
foo%
Temporary parameter used at various points in the program.
full_display$
String containing complete input data. Used by scroll left and scroll right routines.
info_index%
Index used when cycling through display of various system parameters.
loopcount%
Integer to keep track of the next number to generate in the rwloop routine.
looping%
Flag indicating whether to continue in the F3, number seek routine.
mode%
Flag indicating mode. Set to 0 for normal, 1 for scrolling up, and 2 for scrolling down.
mode_dn%
Setting for scrolling down the file or scanning. Set to 2.
mode_norm%
Setting for having scrolled up to the top or down to the bottom of the file. Set to 0.
mode_up%
Setting for scrolling up through the file. Set to 1.
nbytes%
Number of bytes to delete from the data file when deleting the most recent data entered.
nodupes%
A toggle that indicates to the input routine whether to allow duplicate scans.
rdate$
Variable to hold and display the date field from seek record in F3, number seek routine.
record$
64-character string built to create a record that will be stored on the memory card. Initialized to null string. Built from data$ + <tab> + time + <tab> + date.
ri%
Loop index used when alerting user to error opening data file.
rtime$
Variable to hold and display the time field from seek record in F3, number seek routine.
Chapter 3 Operating System Software
71
Page 80
Variable
Description running%
Flag indicating whether to keep running program. Set to 1 (or true%) while running; set to 0 (or false%) when unit receives I (Unlock) command at serial port.
seekprompt$
String to hold the prompt for the F3, seek a number routine.
shift%
Index used to control display during scroll left and scroll right routines.
symbol%
Parameter returned by INPUTEVT indicating bar code symbology of input data. Returns a 1 for Code 39, 2 for UPC-A or UPC-E, 4 for Interleaved 2 of 5, 8 for Codabar, 16 for EAN, 64 for UCC Code 128, or 128 for Code 128. The default application does nothing with this value.
timewritten$
Time and date string read back from memory card record in the rwloop routine.
total_files$
String to hold the count of the total number of files on the memory card.
type%
Parameter returned by INPUTEVT indicating type of input event. Returns a 1 for input, 2 for exit, 3 for scanning a 5-space bar code that will delete the last input), 4 for scroll up key, 5 for scroll down key, 6 for power off switch, 7 for unexpected power loss, 8 for ESC key, 9 for scan button pressed and released, 10 for no memory card module found, 11 for no memory card found, 12 for unknown memory card found, 13 memory card ID has changed, 14 for memory card processor interrupted, 18 for scroll left key, 19 for scroll right key, 20 for MEM key, 21 for BAT key, 22 for f1 key, 23 for f2 key, 24 for f3 key, 25 for f4 key, or 26 for f5 key. (The LaserLite Mx recognizes all of these events, the LaserLite Pro recognizes events 1–9 and 18–26, and the LaserLite and DuraTrax recognize events 1–7 and 9.)
vertoggle%
Index used when cycling through display of operating system version number and build date when the F4 key is pressed.
voltage%
Current battery voltage.
volt1%, volt2%
Battery voltage thresholds that trigger low voltage warnings.
72
Chapter 3 Operating System Software