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

DuraTrax/LaserLite, LaserLite Pro/LaserLite Mx Developer's Reference, pages 21 to 30

Pages 21 to 30 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 21

Download and Vxcom Parameters Following are descriptions of the parameters for Download and Vxcom: app.s

The compiled application program: either an application created with Application Builder, with Videx BASIC, or the default application Default.s. Triggered by the .S extension. This parameter is optional. (Note: If an *.OS file is passed as a parameter, but a *.S file is not listed, nor can the Default.s file be located, then the file transfer process terminates.) To avoid the error, the Default.s file must reside in the same folder as the Vxcom or Download communications programs.

REF.CRF This is the application program’s *.CRF cross-reference files (if the application uses *.CRF files). Triggered by the .CRF extension. If the application uses more than one crossreference file, the *.CRF filenames must be separated by a space. This parameter is optional, but if the application program uses *.CRF cross-reference files, they must be listed for the application to perform properly. *LaserLite Mx Memory Card Note: Text cross-reference files for the LaserLite Mx memory card must be transferred to the memory card with a commands file. See pages 25–42 for information on the commands file, see Chapter 5 for information on using LaserLite Mx memory cards, and see pages 137–138 and 147 for examples of transferring a crossreference file to a memory card.

Chapter 1 Communications Programs

13

Page 22

sys.os

The operating system software for the data collector. Triggered by the .OS extension. This parameter is optional unless you have reset the data collector to monitor mode. (Note: The exact name of the operating system software will change as new versions are released, but will always end with a .OS extension. Each product’s operating system will always begin with the same letters: Trax for DuraTrax, Lite for the LaserLite; Pro for the LaserLite Pro; and Lmx for the LaserLite Mx.)

image.img The image file is a combination of the operating system, application program, and *.CRF cross-reference files that can be loaded into the flash memory of the LaserLite Mx or LaserLite Pro. Triggered by the .IMG extension. This parameter can be used instead of, but not with the *.S, *.CRF, and *.OS parameters. The image file is controlled by the -f and -k arguments described on pages 15–16. (Only available for versions 1.38 or later of Vxcom and Download.) cmd.txt

14

The commands file is a text file containing commands to be performed by the communications program. Triggered by .TXT, .VDX, or no extension. (See the commands file description and defaults on pages 25–42.) This parameter is optional unless you are transferring files to or from the LaserLite Mx memory card. (Note: This file can also change a data collector’s ID.)

Chapter 1 Communications Programs

Page 23

{arguments} include: -dn

Indicates IR device to use (0–1); n is the device number. Use 0 for a Videx Base Station or if your computer has a built-in IR transceiver, and 1 for a JetEye. Default is 0. (Note: This argument’s configuration numbers changed with version 1.38. Prior versions used -d2 for a built-in IrDA transceiver.) 0 - (default) Prepares Base Station or computer’s built-in IrDA transceiver for communications with data collector. (Note: DuraTrax, LaserLite, LaserLite Pro, and LaserLite Mx support the IrDA physical layer only. Computers with built-in IrDA transceivers must disable the link access protocol and the link management layers before using Vxcom or Download.) 1 - For use with JetEye PC IR station; pulls DTR low.

-fn

This argument is for LaserLite Pro and LaserLite Mx only, and works only in conjunction with the -k argument. It indicates if the image file (*.IMG) should be loaded into the flash memory of the LaserLite Mx or LaserLite Pro; n is the option number (0– 1). Default is 0. (This argument is only available for versions 1.38 or later of Vxcom and Download.) 0 - (default) Do not load to flash memory. 1 - Load image file to flash memory.

Chapter 1 Communications Programs

15

Page 24

-kn

This argument works in conjunction with the -f argument. Indicates if the image file (*.IMG file) is created, sent to the data collector, and erased from the computer; or if the image file is created, sent to the data collector, and a copy of the *.IMG file is kept on the computer; or if the image file is created and kept on the computer; n is the option number. Default is 0. (This argument is only available for versions 1.38 or later of Vxcom and Download.) 0 - (default) Sends file (*.IMG) to data collector then erases file from computer. 1 - Sends file to data collector and saves *.IMG file on computer. 2 - Keeps file on computer; does not send file to data collector.

-pn

Indicates serial port to use (1–4); n is the port number. You can use ports 1, 2, 3, or 4. Default is 1.

-qn

This argument is only for Download.exe versions 1.38 and later. Indicates if the communications program displays its messages or operates in the background (0–1); n is the option number. Default is 0. 0 - (default) Messages displayed on computer screen. 1 - Quiet; no messages. Operates in background.

-sn

This argument indicates if the communications result code and unit ID are kept in the Status.txt file or not (0–2); n is the option number. Default is 0. (This argument is only available for versions 1.38 or later of Vxcom and Download.) 0 - (default) Does not record status. 1 - Writes status to file; overwrites current file. 2 - Writes status to file; appends to current file. Note: No status message is written for an Unlock command timeout error. Pressing the <Escape> key will terminate the communications program.

16

Chapter 1 Communications Programs

Page 25

The format of the Status.txt is as follows: Line 1 – Name and version of calling program with the date and time executed. Line 2, 3, ... (up to the number of units contacted in session) – Unit’s ID (if contacted), error number and description, or communication result, date, and time. Following is an example of a Status.txt file, followed by a table that describes the status codes. Status.txt File Example Download v. 1.38 09/16/97 13:33:09 DURATRAX, 16001, I gave up while waiting for a character. VXComm v. 1.38 09/16/97 13:47:42 0000000000 No data. 13:47:54 VXComm v. 1.38 09/16/97 13:48:00 DURATRAX Transferred to DATA.TXT 13:48:12 VXComm v. 1.38 09/19/97 11:58:41 , 18007, There was an error talking to a serial port. Download v. 1.38 09/23/97 10:08:26 0000000000 Transferred to DATA.TXT 10:09:08 DURATRAX Transferred to DATA.TXT 10:09:23

Status.txt Codes Code

Description

16001 16002 16003 16004 16005 16006

Gave up waiting for a character. Aborted transmission. Got out of sync with other party in transmission. Keep missing parts of packets; there may be too much noise on line. Received the start of the packet, but rest of packet is badly formed. Received a well formed packet, but the check digits were wrong. May have noise on the line. Cannot open the serial port. Unknown command in the commands file. Error in communications. C and I commands in commands text file require identifiers. No such serial port. Error accessing a file. Not enough memory to continue. Error talking to the serial port.

18000 18001 18002 18003 18004 18005 18006 18007

Chapter 1 Communications Programs

17

Page 26

Code

Description

18008

One of the command line arguments in the commands file does not make sense. Loops in the commands file are nested too deeply. The file size exceeds the device’s capacity. There is no application file to load with the OS. You must specify either an OS file or an image file to load into flash. Image files (*.IMG) can only be loaded into flash. The structure of a cross-reference file is corrupted. Operation successful. Unrecognized memory card. This version recognizes Toshiba’s SSFDC 2, 4, and 8 MB memory cards. Unrecognized memory card. Syntax error. CRC of command did not match. Unknown command. Missing parameters for this command. Incorrect parameters for this command. Binary file. Incorrect file type. Too much data in the command. No ID file. No data. No such file exists. No file opened. Too many files (>60 files). The page has already been written to four times. (Note: Toshiba only allows you to write to a page four times.) No such record exists. End of file. Beginning of file. Timeout occurred. Memory full.

18009 18010 18011 18012 18013 18014 21000 21001 21002 21003 21004 21005 21006 21007 21008 21009 21010 21022 21023 21031 21032 21033 21034 21035 21036 21037 21038 21039

18

Chapter 1 Communications Programs

Page 27

Code

Description

21040 21041 21042 21043

Write/protect encountered. Record too large (>1024 bytes). Field too large (>255 bytes). Some of the physical functions are locked to avoid data corruption. Try: N &0129 to unlock. File management error (control data was changed). Sequential file corrupted (by accidental power failure). Data corrupted. CRC of boot file did not match (program data may be corrupted). Memory card program failed (card may be worn out). Block erase failed (card may be worn out). Unknown memory card format. First block of memory is bad (broken card).

21051 21052 21053 21054 21061 21062 21063 21064, 21065 21066 21067 21068

Too many bad blocks (card may be damaged). Most of the reserved control blocks are bad (card worn out). The memory card has been erased more than 32,768 times (each K &1092 or N &1092 counts as one erasing).

Chapter 1 Communications Programs

19

Page 28

Windows DLL for Vxcom Vxcomm.dll (version 2.10)

Vxcomm.exe calls a 32-bit dynamically linked library (DLL) with functions that invoke the communications routines. This DLL is used by Application Builder to transfer an application to the data collector, and can also be used by developers who are integrating Videx data collectors into their Windows application. The header file vxcomm.h documents the C calling conventions. Vxcomm.dll has a standard export function Vxcomm_vb. (Note: If you have an earlier version of Vxcomm.dll, visit the Videx website at www.videx.com to obtain the latest version of Vxcomm.dll.) This is an example of the function declaration from Visual Basic 6.0: Declare Function vxcomm_vb Lib "vxcomm.dll" _ (ByVal owner As Integer, _ ByVal cmd As String, _ ByVal sys As String, _ ByVal app As String, _ ByVal crfs As String, _ ByVal port As Integer, _ ByVal config As Integer) _ As Integer This is an example of a call from a form: Private Sub Command0_Click() Dim x x = vxcomm_vb(pNull, command_var, sys_var, app_var, _ crf_var, port_var, config_var) MsgBox (x) End Sub

20

Chapter 1 Communications Programs

Page 29

The parameters are defined below: Vxcomm_vb ( HWND owner char const * cmd char const * sys char const * app char const * crfs long int port long int config

/*parent of progress window, if declared as Null, progress window is parent of top level window*/ /*name of commands file or NULL*/ /*operating system filename or NULL* /*application filename or NULL*/ /*comma delimited list of crf files*/ /*port number (1-4)*/ /*configuration, see below*/

); The config parameter uses a bit-mapped scheme to pass a set of Boolean parameters (communications options). Previous versions of Vxcomm.dll used the config parameter to specify the serial mode to use, i.e., Videx downloader or JetEye IR transmitter. This functionality is preserved for backward compatibility. The communication options that are supported by version 2.10 of Vxcomm.dll via the config parameter are defined in the following table: serial_type flash save_temp dont_load quiet status stat_append half_duplex

Add 0 to config for Videx downloader; add 1 to config for JetEye IR transmitter; add 2 to config for standard serial. Add 0 to config to load to RAM; add 16 to config to load to flash. Add 0 to config for do not save temporary files; add 32 to config to save temporary files. Add 0 to config to load files into data collector; add 64 to config to not load files into data collector (effective only if saving temporary files). Add 0 to config for not quiet; add 128 to config for quiet mode. This option is only present for code compatibility and has no effect on the execution of the function. Add 0 to config for no status file; add 256 to config to create a status file. Add 0 to config to overwrite status file; add 512 to config to append to status file (effective only if creating a status file). Add 0 to config for full duplex mode; add 1024 to config for half duplex mode. Chapter 1 Communications Programs

21

Page 30

If the save_temp option is enabled, the application or image file that is created by Vxcomm.dll is preserved rather than erased. If an application and cross-reference files are passed to Vxcomm.dll, the name of the file that is created is combined.app. If an operating system, application and cross-reference files are passed to Vxcomm.dll, the name of the created file is flash.img. If loading to the flash memory on the LaserLite Pro or the LaserLite Mx instead of to RAM, it is recommended that the program determine whether the image file (flash.img) will fit into the flash memory. The check_file_size function is provided to do this. The declaration from Visual Basic 6.0 is: Declare Function check_file_size Lib "vxcomm.dll" _ (ByVal filename as String, _ ByVal max_size as Long) _ as Integer where filename is the name of the file to be loaded to flash memory (generally flash.img), and max_size is the maximum size (in bytes) of a file which is allowed to be loaded to flash (generally 128K or 131072). This function returns 0 if the size of filename is less than max_size; otherwise it returns 18010 (file size exceeds the device’s capacity).

22

Chapter 1 Communications Programs