PDT 1100 Terminal DLL Guide
PDT 1100 Terminal DLL Guide 70-36556-01 Revision B — May 2001 2 Symbol Technologies, Inc. One Symbol Plaza, Holtsville N.Y.
PDT 1100 Terminal DLL Guide 70-36556-01 Revision B May 2001
1998 - 2001 by Symbol Technologies, Inc. All rights reserved. No part of this publication may be reproduced or used in any form, or by any electrical or mechanical means, without permission in writing from Symbol. This includes electronic or mechanical means, such as photocopying, recording, or information storage and retrieval systems. The material in this manual is subject to change without notice. The software is provided strictly on an “as is” basis.
Contents About This Guide Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v Chapter Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi Notational Conventions . . . . . . . . . .
PDT 1100 Terminal DLL Guide Directory Path Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 File Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 Start of File Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Chapter 3.
About This Guide Introduction This document describes the use of the Dynamic Link Library (DLL) of IR-Transfer Utilities. It is intended for programmers who already have some experience in programming.
PDT 1100 Terminal DLL Guide Chapter Descriptions ! Chapter 1, Introduction describes the Ir-Transfer Utility C and E DLL. ! Chapter 2, DLL File Formats describes the file formats used in the Ir-Transfer Utility C and E DLL. ! Chapter 3, Setting up the PDT 1100 in System Mode describes how to set up the PDT 1100 to accept downloading and uploading from the host.
About This Guide Note: Symbol Technologies is not responsible for any damages incurred during shipment if the approved shipping container is not used. Shipping the units improperly can possibly void the warranty. If the original shipping container was not kept, contact Symbol to have another sent to you. Symbol Support Centers For service information, warranty information or technical assistance contact or call the Symbol Support Center in: United States Symbol Technologies, Inc.
PDT 1100 Terminal DLL Guide Wear items and accessories having s Symbol serial number, will carry a 90-day limited warranty. Nonserialized items will carry a 30-day limited warranty. Warranty Coverage and Procedure During the warranty period, Symbol will repair or replace defective products returned to Symbol’s manufacturing plant in the US. For warranty service in North America, call the Symbol Support Center at 1-800-653-5350.
Chapter 1 Introduction The Dynamic Link Library for IR-Transfer Utility C V1.04 and IR-Transfer Utility E V1.02 transmits program files and data files between the PDT 1100 Terminal and the host computer. The DLL runs on Microsoft ® Windows 95 ® and Windows NT® 3.51/4.0. DLL Disks The DLL for IR-Transfer Utility C Disk Contains: Under the Root Directory ! Readme.txt This document ! It3cw32d.dll DLL files Under the VC40 directory ! It3cw32d.lib Import library name file for VC++4.0 ! It3cApi.
PDT 1100 Terminal DLL Guide The DLL for IR-Transfer Utility E Disk Contains: Under the Root Directory ! Readme.txt This document ! It3ew32d.dll DLL files ! It3e*.dll DLL file for initializing IR devices Under the VC40 directory ! It3ew32d.lib Import library name file for VC++4.0 ! It3eApi.h Header name file for VC++4.0 Under the VB40 directory ! It3ew32.bas ! Formmain.frm FRM file for VB4.0 demonstration program Module file for VB4.0 ! Formmain.frx FRX file for VB4.
Introduction The PDT 1100-IR protocol is a PDT 1100 terminal’s format for transmitting data between the PDT 1100 and the host computer. For details, refer to the PDT 1100 Product Reference Guide. Computers Available for IR-Transfer Utility C DLL IR-Transfer Utility C DLL can run on personal computers equipped with the Intel 80386 CPU or higher capability that can operate Microsoft Windows 95 or Microsoft Windows NT3.51/ 4.0.
PDT 1100 Terminal DLL Guide External IR Transceivers The table below lists supported external IR transceivers and their corresponding DLL files for initializing them. To use any of these external IR transceivers, specify the corresponding DLL file using the +I option (refer to Options on page 2-7). Table 1-1. Available External IRTransceivers Manufacturers Models DLL filenames ALPS ELECTRIC IR MultiStation IT3EAIRM.DLL FUJITSU FMIR-102 IT3EFMIR.DLL KANSAI ELECTRIC KC-IR1 IT3EKKCI.
Chapter 2 DLL File Formats File Formats Supported by DLL The DLL supports user program files, function files, and date files. User Program Files Ir-Transfer Utility C DLL regards MS-DOS files with the extension .PD3 as user program files (object program files). Files are developed using the PDT 1100-BASIC 3.0 Compiler. As shown, each record in a user program file is fixed to 128 bytes in length (except the last record) and suffixed by a set of CR and LF codes (CR-LF codes), 0Dh and 0Ah.
PDT 1100 Terminal DLL Guide When downloading a program file, if the length of the last record is less than 128 bytes, the blank bytes (128 bytes minus last record length) are zero-filled so that every record is 128 bytes long. Record length (128 bytes) CR LF CR LF CR LF When downloading: Record length (128 bytes) Zero Codes Note: In the PDT 1100-Ir protocol, CR-LF codes that are used as record separators in data are removed before file transmission.
DLL File Formats Each record in a function file is fixed to 130 bytes in length (except the last record) and suffixed by a set of CR-LF codes, as follows. Record length (130 bytes) Record CR CR LF CR LF CR LF CR LF CR LF LF When downloading a function file, if the length of the last record is less than 130 bytes, the blank bytes (130 bytes minus last record length) are zero-filled, so that every record is 130 bytes long.
PDT 1100 Terminal DLL Guide Note: In the PDT 1100-Ir protocol, CR-LF codes that are used as record separators in data are removed before file transmission. When receiving downloaded function files, the PDT 1100 packs twobyte ASCII characters into two 4-bit hexadecimal codes in a single byte, to improve the PDT 1100’s performance and memory availability. Data Files Ir-Transfer Utility C DLL regards MS-DOS files with an extension other than .PD3, .FN3, and .EX3 as data files.
DLL File Formats In downloading a data file, if the actual record length is less than the specified record length, the blank bytes are filled with space codes (20h); if it exceeds the specified record length, the excess is discarded.
PDT 1100 Terminal DLL Guide To handle CR-LF codes as data, specify the +C option. CR-LF codes in records are transmitted as data: Specified Record Length Record n1 CR LF Record n2 CR LF When downloaded: Specified Record Length Record n1 CR LF Record n2 = Transmitted in a single block Even if you specify the +C option, use CR-LF codes as a record separator.
DLL File Formats Directory Path Names and File Names Directory Path Names Specify the directory path of a file to be sent or received. You may specify either an absolute or relative path. If no path name is specified, the current working directory becomes active by default. Specification of a path name only is not allowed.
PDT 1100 Terminal DLL Guide Table 2-1. Options (Continued) Options +Fn Functions Sets the number of digits for fields for a data file to be sent. Defaults ---- +F[,, ......] (n=1 to 16 If a file consists of three fields whose lengths are as follows: =13,=20,=6 +F13,20,6 +I,-I Determines whether to initialize the IR device.
DLL File Formats Table 2-1. Options (Continued) Options +T, -T Functions Defaults -T Determines whether to insert field separators. Inserts field separators (specified by or ) between fields when writing a received data file. This option should be specified in either of the following two formats. For characters (see Note 2) which cannot be specified in Format 1, use Format 2. If this option is specified in other incorrect formats, no operation is assured.
PDT 1100 Terminal DLL Guide Table 2-1. Options (Continued) Options Functions +L timeoutlength Sets the timeout length in seconds. +Ln n=0 to 65535 Specification of +L0 produces no timeouts. Specification of only +L makes the default (30 seconds) active. +X x-coordinate Specifies the x-coordinate of the PDT 1100 Sending or PDT 1100 Receiving dialog box. +Xn n=-65535 to 65535 This specifies the location of the left side of the dialog box.
DLL File Formats Start of File Transmission If It3cw32d is initiated, the Ir Sending dialog box (when downloading) or PDT 1100-Ir Receiving dialog box (when uploading) is displayed, and file transmission starts. PDT 1100-Ir Sending The PDT 1100-Ir Receiving appears in uploading. 00000/00300 Number of transmitted records (serial number)/Total number of records to be transmitted. Click this Abort button to abort the transmission.
PDT 1100 Terminal DLL Guide 2-12
Chapter 3 Setting up the PDT 1100 in System Mode This chapter describes the PDT 1100 preparation required for using Ir-Transfer Utility C and E DLL. File Transfer in System Mode For file transfer in System Mode, use the following procedure: 1. Starts System Mode 2. Sets the Communications Parameters 3. Downloads Files 4.
PDT 1100 Terminal DLL Guide Setting up the PDT 1100 in System Mode Hold down the SF and 1 keys to power on the PDT 1100. Setting Communications Parameters The table below lists the default communications parameter values: Table 3-1. Communications Parameter s Communications parameters Defaults Transmission speed 9600 bps Output pulse width of IR beam 1.
Setting up the PDT 1100 in System Mode Uploading Use the upload menu in System Mode to upload files. For details, refer to the PDT 1100 Product Reference Guide. Programming in PDT 1100-BASIC 3.0 Setting Communications Parameters using the OUT Statement You may set the communications protocol type using the OUT statement. The following sample sets the PDT 1100-Ir protocol. OUT &h6060,2 The PDT 1100 System version 1.
PDT 1100 Terminal DLL Guide 3-4
Chapter 4 DLL Functions Ir-Transfer Utility C DLL supports the following three functions: ! GetIt3cDllVersion() Gets the version of the current DLL. ! ExecIt3c() Transfers files. ! AbortIt3c() Aborts the current file transfer. You can call these functions from VC++4.0 or VB4.0. For VC++4.0, include “ It3capi.h.” For VB4.0, use the function “It3cw32d.dll” by writing the declare statement into “(General) (Declarations)” of the module file. For the instructions on how to use them, refer to the “It3cw32.
PDT 1100 Terminal DLL Guide GetIt3cDllVersion() Description Gets the version of the current DLL. Syntax For VC++4.0 char *GetIt3cDllVersion(char *Param); For VB4.0 Declare Function GetIt3eDclVersion Lib “It3cw32c.dll” (ByVal Param As String) As String where: Param = Character string where the version character string of the DLL is to be stored. Sufficient length is required. If you are using VB4.0, use the String variable such as String(100.“ ”) to reserve the memory area.
DLL Functions ExecIt3c() Description Uploads (receives) or downloads (sends) the designated file. Syntax For VC++4.0 typedef enum errorcode { Er_NOERROR = 0, /* Communication ended normally. Er_NOFILE = 1, /* Designated file not found. : : } Er; Er ExecIt3c(HWND hWnd, char *Param, char *TransferFileName); */ */ For VB4.0 Declare Function ExecIt3c Lib “It3cw32d.
PDT 1100 Terminal DLL Guide Returned value For VC++4.0: Use “It3capi.h.” for the Macro code (enum type) for the returned codes. For VB++4.0: Refer to “It3cw32.bas.” for the returned code.
DLL Functions AbortIt3c() Description Aborts the current file transmission. Syntax For VC++4.0 int AbortIt3c(void); For VB4.0 Declare Function AbortIt3c Lib “It3cw32d.dll” () As Long Returned value This function returns the same value as an error code, showing the current file transfer status when it is called. 0 Was not transferring. 60 Was sending. 61 Was receiving.
PDT 1100 Terminal DLL Guide 4-6
Appendix A Error Codes If an error occurs during execution of Ir-Transfer Utility C or E DLL, one of the error codes from Table 1-1 is returned. Table 1-1. Error Codes Code Description 0 Normal end. 1 Ir-Transfer Utility C DLL could not find the designated file. 2 Filename entered in the wrong format. 3 The total number of the records specified in a file exceeds 32767. 4 The data field is out of range from 1 to 254 digits in length. 5 The number of fields is out of the range from 1 to 16.
PDT 1100 Terminal DLL Guide Table 1-1. Error Codes (Continued) Code Description 53 Communications error. The NAK sending counter has counted up to 10. 54 Communications error. The NAK receiving counter has counted up to 10. 55 Communications error. The sending station receives as EOT in response to the sent text. 60 The DLL has been running in sending operation. 61 The DLL has been running in receiving operation.
Index B bullets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi C communications parameters . . . . . . . . . . . . 3-2 conventions notational . . . . . . . . . . . . . . . . . . . . . . . . vi D data files . . . . . . . . . . . . . . . . . . . . . . . . . . . disk contents - C . . . . . . . . . . . . . . . . . . . . . disk contents - E . . . . . . . . . . . . . . . . . . . . . download . . . . . . . . . . . . . . . . . . . . . . . . . . downloading . . . . . . . . . . . . . . . . . . . . .
PDT 1100 Terminal DLL Guide S send files . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 service information . . . . . . . . . . . . . . . . . . . . . vi statement OPEN "COM" . . . . . . . . . . . . . . . . . . . . 3-3 OUT . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 XFILE . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 symbol support center . . . . . . . . . . . . . . . . . . vii system mode . . . . . . . . . . . . . . . . . . . . . . . . 3-2 U upload . . . . . . . . . . . . .
Tell Us What You Think... We’d like to know what you think about this Manual. Please take a moment to fill out this questionaire and fax this form to: (631) 738-3318, or mail to: Symbol Technologies, Inc. One Symbol Plaza M/S B-4 Holtsville, NY 11742-1300 Attn: Technical Publications Manager IMPORTANT: If you need product support, please call the appropriate customer support number provided. Unfortunately, we cannot provide customer support at the fax number above.