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 46 of 47

PDT 1100 Terminal Programmer's Guide: Appendix M Communications, pages 398 to 407

Pages 398 to 407 of 413, from PDT 1100 Terminal Programmer's Guide

The original document is the PDF (3.5 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 Symbol PDT-1100

Page 398

Communications

Phase 2 with a sequence of DLE EOT and IDs: If the sending station receives a sequence of DLE EOT and IDs anytime during phase 2, it shifts to phase 3 to terminate the message transmission abnormally. Even if the phase 3 terminates normally, the transmission results in an abnormal end. Sending Station

Receiving Station DLE EOT and IDs

Occurrence Of An Error

To phase 3.

Figure M-27. Phase 2 with a sequence of DLE EOT and IDs

Phase 2 with repeated transmission of DLE ENQ and IDs due to no response or invalid response If the sending station receives no response or an invalid response from the receiving station after a transmission block is sent, it resends a sequence of DLE ENQ and IDs every 0.5 seconds up to 59 times. If the sending station receives a sequence of DLE ACK and IDs during this time, it continues the subsequent message transmission.

Receiving Station

Sending Station Data Text m

0.5 second

DLE ENQ and IDs

0.5 second

DLE ENQ and IDs DLE ACK and IDs Data Text m+1

35864075.eps

Figure M-27. Phase 2 with repeated transmission of DLE ENQ and IDs M-31

Page 399

PDT 1100 Terminal Programmer’s Guide

Abnormal termination of phase 2 (Abort of phase 2): If the sending station receives no sequence of DLE ACK and IDs from the receiving station after sending a sequence of DLE ENQ and IDs 59 times in succession, it sends a sequence of DLE EOT and IDs to the receiving station 0.5 seconds after the 59th sequence of DLE ENQ and IDs and then aborts this transmission. Receiving Station

Sending Station 0.5 second 0.5 second

0.5 second

DLE ENQ and IDs(1) DLE ENQ and IDs(2)

DLE ENQ and IDs(59) DLE EOT and IDs

Abnormal Termination

Figure M-28. Abort of Phase 2

Phase 3: Release of Data Link Normal phase 3: The sending station transmits a sequence of DLE EOT and IDs to the receiving station. When a sequence of DLE ACK and IDs is received from the receiving station, the sending station terminates the message transmission normally and releases the data link.

Sending Station

DLE EOT and IDs

DLE ACK and IDs

Normal Termination

Figure M-28. Normal Phase 3 M-32

Receiving Station

Page 400

Communications

Phase 3 with iterated transmission of DLE EOT and IDs due to no response or invalid response: If the sending station receives no response or an invalid response from the receiving station after a sequence of DLE EOT and IDs is sent, it resends the sequence every 0.5 seconds up to 60 times. If the sending station receives a sequence of DLE ACK and IDs before sending the sequence of DLE EOT and IDs 60 times, it terminates the message transmission normally and releases the data link. Sending Station

DLE EOT and IDs (1)

0.5 second

DLE EOT and IDs (2)

0.5 second

DLE EOT and IDs (3)

Receiving Station

DLE ACK and IDs

Normal Termination

Figure M-29. Phase 3 with RepeatedTransmission of DLE EOT and IDs Abort of Phase 3: If the sending station receives no sequence of DLE ACK and IDs from the receiving station within 0.5 seconds after the 60th sequence of DLE EOT and IDs, it aborts the message transmission and releases the data link.

Sending Station

DLE EOT and IDs (1)

Receiving Station

0.5 second DLE EOT and IDs (2) 0.5 second DLE EOT and IDs (3)

0.5 second

DLE EOT and IDs (60)

Abnormal Termination 35864077.eps

Figure M-29. Abort of Phase 3 M-33

Page 401

PDT 1100 Terminal Programmer’s Guide

Phase 3 with timeout at the receiving station: If the receiving station receives no subsequent text or normal sequence of DLE EOT and IDs within 30 seconds after sending a sequence of DLE ACK and IDs, it sends a sequence of DLE EOT and IDs and aborts the transmission.

Sending Station

Receiving Station Data Text m DLE ACK and IDs 30 seconds

DLE EOT and IDs

Abnormal Termination

35864078

Figure M-30. Phase 3 with Timeout at the Receiving Station

Aborting Data Transmission Pressing the C key aborts data transmission. If the C key is pressed during downloading, the PDT 1100 transmits a sequence of DLE EOT and IDs and aborts the file transmission. If it is pressed during uploading, the PDT 1100 transmits the current transmission block followed by a sequence of DLE EOT and IDs and aborts the file transmission.

CRC The Ir protocol supports CRC (Cyclic Redundancy Check) which uses the CRC-16 generating system to check data transmission. A CRC character is suffixed to a sequence of DLE ETX of every transmission block.

M-34

Page 402

Communications

Operands for CRC-16 The CRC generates CRC-16 from all bytes of a transmission block excluding DLE SOH or DLE STX characters (which are at the head of a transmission block), DLE character of DLE ETX and DLE character of DLE DLE in the text.

CRC operation The CRC system generates CRC-16 as follows: 1. It multiplies the polynomial formed by aligning all bits starting from the LSD of the first byte to the MSD of the last byte in a transmission block in descending order, by X 16. 2. Divide the polynomial by the generative polynomial X 16 + X 15 + X 2 + 1. The remainder is the value of CRC-16. Figure 3-X shows a data text transmission block and operands for CRC-16 generation.

D S L • T E X

I

Serial Number

Data Text 1

D

E D L • T X E

C R C 35864079.eps

Operand Operand

Figure M-31. CRC-16 Data Text Transmission Block and Operands

ID ID is a 2-digit hexadecimal designated in 0000h through FFFFh in (2 bytes). 0000h is assigned to the host computer. Any of 0001h through FFFFh is assigned to the PDT 1100 as follows. ! !

The system sets an ID when the PDT 1100 is initialized. You may set an arbitrary ID in System Mode or by using the OUT statement in BASIC 3.0.

Text Format Format text according to the standard of the Ir CRD 1100 protocol before transmission. Following are two types of the standard text formats for program files and data files.

M-35

Page 403

PDT 1100 Terminal Programmer’s Guide

Program Text Format Byte Position

1

2

3

4

5

6

7

8

9 10

11 12 13 14 15 16 17 Number of Data Texts Contained (5 bytes)

Program File Name (12 bytes) Example of Contents

P

R

O G

1

The program file name is a maximum of 12 characters and consists of FILE NAME and.EXTENSION. The FILE NAME should be 1 to 8 characters. The EXTENSION should be.PD3 (.FN3 and.EX3 may be available for future functional expansion).

.

P D

3

0

If the program file name is less than 12 characters, the lower blank bytes are filled with space characters.

0

3

5

35864064.eps

2

The number of data texts is 0 to 32767. If less than 5 digits, the upper blank bytes are filled with zeros (0).

35864064.eps

Figure M-32. Program Text Format: Heading Text

128 or 130 130

Byte Position

1

2 3 4 Program Data

128 bytes if extension is .PD3; 130 bytes if it is .FN3 or .EX3. 0 D

Example of Contents

0 A 0

0

0 0

0 0 35864065.eps

Object file (compiled from a source program file having one of the extensions.PD3,.FN3, or .EX3.)

If a program data field is less than the maximum digits, the lower blank bytes filled with zeros (0).

35864065.eps

Figure M-33. Program Text Format: Data Text

M-36

Page 404

Communications

Data Text Format Number of Fields (2 bytes) Length of Data Field 1 (2 bytes) Byte Position

Example of Contents

Length of Data Field n (2 bytes)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 Number of Data Texts Contained (5 bytes)

Data File Name (12 bytes)

0 0 5 9 2

M A S T E R . D A T n

0 0 6

Every data field should be 1 to 254 digits. If it is less than 2 digits, the upper blank byte is filled with zero (0).

The data file name is a maximum of 12 characters in length and it consists of FILE NAME and.EXTENSION. The FILE NAME should be 1 to 8 characters. The EXTENSION should be other than.PD3,.FN3, and .EX3, and it may be omitted (together with a period).

The number of fields should be 1 to 16. If it is less than 2 digits, the upper blank byte is filled with zero (0).

If the data name is less than 12 characters, the lower blank bytes are filled with space characters.

The number of data texts should be 0 to 32767. If it is less than 5 digits, the upper blank bytes is filled with zeros (0).

Figure M-33. Data Text Format: Heading Text

Data Field 1 Example of Contents

T 1

0

0

9

Every data field should be 1 to 99 digits

Data Field n

Data Field 2

1

S 1

2

3

9 2 0 2 1 4 1 3 2 5

If a data field is less than the maximum digits, the lower blank bytes are filled with space characters.

Figure M-34. Data Text Format: Data Text M-37

Page 405

PDT 1100 Terminal Programmer’s Guide

Note: The total length of all data fields plus the number of the character count bytes (plus the number of the fields) should be 255 bytes or less. When you transfer five 50 - digit (50-byte) fields, for example, the total length of all data fields is 250 (50x 5) bytes and the number of the character count bytes is 5. The total is 255, so the file can be transferred.

M-38

Page 406

Index Numerics 00 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16

A abort data transmission . . . . . . . . . M-16, M-34 Access Methods . . . . . . . . . . . . . . . . . . . . . . 8-1 ACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-9 Activating the alphabet input function with OUT statement . . . . . . . . . . . 7-4 Alphabet Input Function . . . . . . . . . . . . . . . 7-3 AND Operator . . . . . . . . . . . . . . . . . . . . . . 6-6 ANK . . . . . . . . . . . . . 10-20, 11-13, 11-43, C-4 APLOAD . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2 Application Programs . . . . . . . . . . . . . . . . . 1-3 Easy Pack . . . . . . . . . . . . . . . . . . . . . . . 1-3 User Programs . . . . . . . . . . . . . . . . . . . 1-3 Arithmetic Operators . . . . . . . . . . . . . . . . . . 6-3 Array Integer Variables . . . . . . . . . . . . . . . . 5-4 Array Real Variables . . . . . . . . . . . . . . . . . . 5-5 Array String Variables . . . . . . . . . . . . . . . . . 5-4 ASC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3 Assigning a Character String to a Function Key . . . . . . . . . . . . . . . 7-8 assignment statement LET . . . . . . . . . . . . 10-70

B BAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-87 bar code buffer . . . . . . . . . . . . . . . . . . . . . . 8-7 Bar Code Device . . . . . . . . . . . . . . . . . . . . . 8-6 BASIC 3.0 . . .1-3, 8-1, 8-11, 9-1, B-1, D-2, D-4 Overview . . . . . . . . . . . . . . . . . . . . . . . 1-3 BASIC 3.0 Compiler . . . . . . . . . . . . . . . . . . 2-2 BASIC 3.0 Interpreter . . . . . . . . . . . . . . . . . F-2

Basic Program Elements . . . . . . . . . . . . . . . 4-1 Basic Program Elements . . . . . . . . . . . 4-1 Battery Backup of Memory . . . . . . . . . . . . . F-2 BCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .M-3 BEEP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-5 Beep Settings . . . . . . . . . . . . . . . . . . . . . . . 10-6 BEEP Statement . . . . . . . . . . . . . . . . . . . . 7-10 Bit Order . . . . . . . . . . . . . . . . . . . . . . . . . . M-2 block check character . . . . . . . . . . . . . . . . .M-3 Block-Format User-Defined Functions . . . . 3-1 Block-Structured Statements . . . . . . . . . . . . 3-2 bullets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xiv

C CALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-9 CHAIN . . . . . . . . . . . . . . . . . . . . . . . . . . 10-11 Character Sets . . . . . . . . . . . . . . . . . . . . . . . C-1 check digit . . . . . . . . . . . . . . . . . . . . . . . . . 8-8 CHKDGT$ . . . . . . . . . . . . . . . . . . . . . . . . 11-6 CHR$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-9 Classification of Variables . . . . . . . . . . . . . 5-5 CLFILE . . . . . . . . . . . . . . . . . . . . . . . . . . 10-13 CLOSE . . . . . . . . . . . . . . . . . . . . . . . . . . 10-15 CLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-17 comment . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 COMMON . . . . . . . . . . . . . . . . . . . . . . 10-18 Common Variables . . . . . . . . . . . . . . . . . . . 5-5 Communications Device . . . . . . . . . . . . . . . 8-8 Communications Parameters . . . . . . . . . . . 8-9 communications specifications . . . . . . . . . .M-1 Comparison of Character Strings . . . . . . . . 6-8 Compilation and Program Execution . . . . . 1-4 Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4 Functions . . . . . . . . . . . . . . . . . . . . . . . 2-3

Index-1

Page 407

Book Title

Compiler and Interpreter . . . . . . . . . . . . . . 1-4 Compiling in Windows . . . . . . . . . . . . . . . . 2-6 Displaying the Compile Results . . . . . 2-12 Executing the Compiler . . . . . . . . . . . 2-10 Operating Procedure for the Compiler . 2-8 Output from the Compiler . . . . . . . . . 2-10 Reading in the Initialization File . . . . . 2-7 Selecting the file to be compiled . . . . . . 2-8 Specifying the Compiling Options . . . . 2-9 Starting the Compiler . . . . . . . . . . . . . 2-7 Concatenation of Character Strings . . . . . . 6-8 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 control characters . . . . . . . . . . . . . . M-6, M-22 Controlling and Monitoring the I/Os . . . . 7-11 Controlling by the OUT Statement . . . . . . 7-11 conventions notational . . . . . . . . . . . . . . . . . . . . . . .xiv COUNTRY$ . . . . . . . . . . . . . . . . . . . . . 11-11 CR code . . . . . . . . . . . .2-5, 4-5, 10-58, 10-108 CRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . .M-34 CRC operation . . . . . . . . . . . . . . . . . . . . .M-35 Creating a source program . . . . . . . . . . . . . 2-2 CSRLIN . . . . . . . . . . . . . . . . . . . . . . . . . 11-13 CURSOR . . . . . . . . . . . . . . . . . . . . . . . . 10-20 cyclic redundancy check . . . . . . . . . . . . . . M-34

D DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-22 Data File Management . . . . . . . . . . . . . . . . 8-3 Data Files and Device I/O Files . . . . . . . . . . 8-1 data link establishment phase . . . . . . . . . . .M-2 Data Retrieval . . . . . . . . . . . . . . . . . . . . . . . 8-5 data text . . . . . . . . . . . . . . . . . . . . . . . . . .M-20 data text format . . . . . . . . . . . . . . . . . . . .M-37 data transmission . . . . . . . . .M-2, M-11, M-28 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 DATE$ . . . . . . . . . . . . . . . . . . . . . . . . . . 11-14 Declarative Statement COMMON . . . . . . . . . . . . . . . . . . . 10-18 DATA . . . . . . . . . . . . . . . . . . . . . . . 10-22 DEFREG . . . . . . . . . . . . . . . . . . . . . 10-24 declarative statement . . . . . . . . . . . . . . 10-115 DEF FN . . . . . . . . . . . . . . . . . . . . . . . . . 10-29

Index-2

DEF FN (Single-line form) . . . . . . . . . . . . 10-29 DEF FN...END DEF . . . . . . . . . . . . . . . . 10-33 DEF FN...END DEF (Block form) . . . . . . 10-33 DEFREG . . . . . . . . . . . . . . . . . . . . . . . . . 10-24 Developing Procedures . . . . . . . . . . . . . . . . . 2-2 Development Environment . . . . . . . . . . . . . 2-1 Required Hardware . . . . . . . . . . . . . . . 2-1 Required Software . . . . . . . . . . . . . . . . 2-2 Development Environment and Procedures . 2-1 DIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-37 direct-connect interface . . . . . . . . . . 8-9, 10-95 Displaying the System Status . . . . . . . . . . . . 7-2 Downloading the user program . . . . . . . . . . 2-2 Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

E END . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-40 EOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-16 ERASE . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-41 Error Codes and Error Messages . . . . . . . . .A-1 error control statement . . . . . . . . . . . . . 10-118 ON ERROR GOTO . . . . . . . . . . . . . 10-78 Error Trapping . . . . . . . . . . . . . . . . . . 9-1, 9-3 error-handling function . . . . . . . . 11-18, 11-19 Error/Event Trapping . . . . . . . . . . . . . . . . . . 9-1 Error-/Event-Handling Routines . . . . . . . . . 3-1 establishment of data link . . . . . . .M-10, M-26 ETX$ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-20 Event Polling . . . . . . . . . . . . . . . . . . . . . . . . 9-1 Event (of Keystroke) Trapping . . . . . . . . . . . 9-1 Executing a User Program . . . . . . . . . . . . . 2-17 Executing the user program . . . . . . . . . . . . . 2-3 Execution Errors . . . . . . . . . . . . . . . . . . . . .A-1 Expressions and Operators . . . . . . . . . . . . . 6-1 Extension Programs . . . . . . . . . . . . . . . . . . . 1-2

F Fatal Errors . . . . . . . . . . . . . . . . . . . . . . . . .A-3 fatal errors . . . . . . . . . . . . . . . . . . . . . . . . .2-12 FIELD . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-43 file I/O function EOR . . . . . . . . . . . . . . . . . . . . . . . . . 11-16 INPUT$ . . . . . . . . . . . . . . . . . . . . . . 11-28