The text of a manual · part 11 of 18
TouchProbe Communications for DOS Computers, pages 101 to 110
Pages 101 to 110 of 171
The original document is the PDF (1.7 MB). 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 TouchProbe
Page 101
Appendix E TouchProbe Command Line Communications
Contents P. 92 P. 93 P. 96 P. 96 P. 97 P. 97 P. 98 P. 99
TouchProbe Command Line Communications TRANSFER.EXE Example Input File Output File History File Status File Error File
Appendix E TouchProbe Command Line Communications
93
Page 102
TouchProbe Command Line Communications Videx provides software tools that enable application developers and programmers to seamlessly integrate TouchProbe communications software with custom application software. One of these software tools is a command line communications program for the TouchProbe called TRANSFER.EXE. This appendix contains information on TRANSFER.EXE version 3.01. TRANSFER.EXE is included with the TouchProbe Communications Software for DOS. TRANSFER.EXE is a small, executable program that enables the user to load configurations into the TouchProbe and transfer data from the TouchProbe. The transferred data is stored as an ASCII text file. TRANSFER.EXE can be run from the DOS prompt, from within a batch file, or from within your own application program. It can be run in a “quiet mode” (using the -q parameter) where it will not produce any output to the screen, making it easy to integrate into application program user interfaces. TRANSFER.EXE can be distributed freely. However, to ensure that application software is properly supported and identified, TRANSFER.EXE must be implemented with the -q parameter so that the Videx name does not appear anywhere in the user interface. C source code for TRANSFER.EXE is also available. If you have any questions or suggestions, please contact the Videx Technical Support department at telephone number (541) 758-0521, fax number (541) 752-5285, by email at support@videx.com, or visit our web site at http://www.videx.com.
94
Appendix E TouchProbe Command Line Communications
Page 103
TRANSFER.EXE TRANSFER.EXE is run from the command line by entering the filename TRANSFER followed by certain parameters. These parameters are explained below: -b <baud rate>
Sets the communication baud rate. Range 300– 19200. Default: 19200.
-c
Disables clearing data from the TouchProbe after download. Default: Clear data.
-d <download time>
The length of time in seconds that the computer attempts to communicate with TouchProbes by calling out the probe IDs over the serial port (0 = forever). If a download time is specified, the program transfers data only once from each TouchProbe in the list. The program terminates once the time has expired or after each of the probes in the list has been transferred. Default: 30 seconds
Appendix E TouchProbe Command Line Communications
95
Page 104
-i <ID file>
List of TouchProbe IDs which are allowed to be transferred. Maximum of 256 IDs. Format: <probe ID><cr/lf> -or- <probe ID> <,> <button config strings (space delimited)><cr/lf> Only data from one TouchProbe is downloaded each time the program is run. The ID list is used to validate an encountered TouchProbe. If a TouchProbe ID that is not in the ID list is encountered the program quits with an error. Button configuration strings are sent to the TouchProbe after the transfer of data. Note: If the TouchProbe is already configured, it is not necessary to resend button configurations. To download any TouchProbe omit the “-i” parameter from the command line. Omitting the “-i” parameter is equivalent to specifying a file list containing just “0000000000” and will download any TouchProbe.
-k
Disables ability to terminate program on key press.
-l <text file>
File containing text to load into TouchProbe’s data area for writing to read/write buttons.
-m [<setup>] [~<dial>] Attach to modem; this parameter is required when using a modem and a TouchProbe Downloader Plus to transfer data. For hostinitiated transfer (TouchProbe Answers ) you must supply the dial string. The program will always send a hang up command to the modem to insure that it is not left off the hook if the communication does not terminate normally.
96
Appendix E TouchProbe Command Line Communications
Page 105
-o <output file>
Data transferred from the TouchProbe is put into this file. Default: Screen.
-p <com port #>
Default: 1 (accepts 1, 2, 3, or 4).
-q
Disables display of version, copyright information, and progress messages.
-s <status file>
Writes status to file with the following format: <date/time>,<probe ID>, <status #>, <cr/lf> Status numbers are defined on page 98. Default: None written.
-t
Disables setting TouchProbe’s clock.
-v [<filename>]
Verbose mode: Detailed progress message generated for communication. Messages can be sent to a file by placing the filename immediately after the -v parameter.
-x <#>
Number of spaces per tab in indented raw scan file.
-z
Translate without transfer.
Appendix E TouchProbe Command Line Communications
97
Page 106
Example Command line to transfer data from a list of TouchProbes, store the data in an ASCII file called DATA.TMD, and record the status in STAT.TXT: TRANSFER -iPROBES.TXT -oDATA.TMD -sSTAT.TXT -d30 Note: In this example, the list of probes to transfer is stored in an ASCII file called PROBES.TXT. This ASCII file must be created by the developer. It is not necessary to use the filename PROBES.TXT. Any valid DOS filename can be used.
Input File The input file is an ASCII text file containing the probe IDs to transfer. The file format is: <probe ID><cr/lf> -or<probe ID><,><button config strings (space delimited)><cr/lf> The probe IDs are case sensitive.
98
Appendix E TouchProbe Command Line Communications
Page 107
Output File The -o parameter creates an output file in which the data from the TouchProbe is stored. If the file already exists, it appends the transferred data to the bottom of the file. The format of the output file is shown below. (For tab information, see -x parameter on page 95.) Beginning of File (Main Header)
Date and Time of Transfer to Computer
H
20000129090419 20000129090314 20000129090318 20000129090320 20000129090403 20000129090404 20000129090406 End of File 20000129090410 (Main Tailer) 20000129090412 T 000
Probe ID
00 12345 31 00000004859F 31 0000000B7303 31 0000000B72DA 31 00000004859F 31 0000000B7303 31 0000000B72DA 31 0000000B715C 31 0000000B6081
Button Origin Code
Button Data
Date and Time of Button Touch
Figure E-1 TouchProbe Output File Format
History File Maintaining a history file of all of the data is a valuable practice. This can be easily accomplished after running TRANSFER.EXE by using the DOS Copy command to append the output file to a history file. For example, with an output file called DATA.TMD and a history file called HIST.TMD, the syntax of the DOS copy command would be: COPY HIST.TMD + DATA.TMD HIST.TMD
Appendix E TouchProbe Command Line Communications
99
Page 108
Status File The -s parameter creates a status file with status numbers for each probe ID. The status file is overwritten each time the program runs. The status numbers are listed below: 000 001 002 003 004 005 006 007 008 009 010 011 012 013
Transfer successful, no errors Time error Config error Retry error Binary file open error Binary file not valid Invalid record type No end record Corrupt record error Invalid ID record Invalid record size Binary file read error Output write error Error clearing data from TouchProbe
100
Appendix E TouchProbe Command Line Communications
Page 109
Error File If any errors occur while TRANSFER.EXE is running, the error messages are written to a file called TRANSFER.ERR. This error file is overwritten each time the program runs. You should check this file each time after running TRANSFER.EXE to be certain that no errors occurred.
0 2 3 4 5 6 7
SUCCESS_EXIT USER_CANCEL PARAM_ERROR TIMEOUT_ERROR NOTINLIST_ERROR SERIAL_ERROR MODEM_ERROR
8 FILE_ERROR 10 MEMORY_ERROR
“Operation was successful” “User cancelled the operation” “One of the parameters is incorrect” “Communications have timed out” “Probe’s ID is not in the list of IDs" “Error opening serial port” “Did not get expected response from modem” “Error reading from or writing to a file” “Ran out of memory”
Appendix E TouchProbe Command Line Communications
101
Page 110
NOTES:
102
Appendix E TouchProbe Command Line Communications