The text of a manual · part 37 of 47
PDT 1100 Terminal Programmer's Guide: Appendix C Character Sets, pages 334 to 342
Pages 334 to 342 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 334
Appendix G Handling Space Characters in Downloading Space Characters as Padding Characters A data file can be downloaded with System Mode or an XFILE statement via a communications protocol which eliminates space characters padded in the tail of each data field. The PDT 1100 has a new feature which treats such space characters as data. For details, refer to the end of this appendix. The following figure shows how the space characters used as padding characters are eliminated. (Space characters between a and b and between b and c in field 3 are not padding characters.)
G-1
Page 335
PDT 1100 Terminal Programmer’s Guide
Host Computer Field 1 1
2
Field 2
3
4
A
B
C
Field 3
D a b
( c denotes a space character.)
Downloading a data file PDT 1100 Field 1 4
Field 2
1
2
3
4
1
2
3
4
4
Field 3
A
B
C
D
A
B
C
D
5 a b c a b c is the count byte of a significant data length in a field. 36099022.eps
Figure G-1. Padding Characters Elimination
Space Characters as Data Special considerations must be made when treating space characters in the tail of a data field as data (not as padding characters).To use a SEARCH function to search for a field data containing space characters in its tail, for instance, use one of the following methods:
G-2
Page 336
Handling Space Characters in Downloading
Example 1 After downloading a data file, fill the unused spaces in each field with space characters and then search for the target field data. A
B
C
Send data
A
B
C
Receive data
A
B
C
Filling with space characters
A
B
C
Search data to be specified
( denotes a space character.) 36099023.eps
Figure G-2. Space Character Substitution
Example 2 Before downloading a data file, substitute any character not used as effective data, e.g., an asterisk (*), for the space characters in the host computer. A
B
C
*
*
Send data
A
B
C
*
*
Receive data
A
B
C
A
B
C
Data to be searched
*
*
Search data to be specified
( denotes a space character.) 36099024.eps
Figure G-3. Asterisk Character Substitution
G-3
Page 337
PDT 1100 Terminal Programmer’s Guide
Example 3 When specifying a field data to be searched, do not include space characters in the tail of the data field. A
B
C
Send data
A
B
C
Receive data
A
B
C
Data to be searched
A
B
C
Search data to be specified
( denotes a space character.) 36099025.eps
Figure G-4. No character Substitution You can also use System Mode or an XFILE statement to specify the handling of space characters in the tail of a data field. System Mode:
To handle space characters as data, select “Data” on the field space setting screen on the communications parameter setting menu from the SET SYSTEM menu.
XFILE statement:
To handle space characters as data, specify T to “protocolspec” in the XFILE statement. XFILE “d2.dat”,“T”
G-4
Page 338
Handling Space Characters in Downloading
The figure below shows how the space characters in the tail of a data field are handled as data in the PDT 1100. Host Computer Field 1 1
2
Field 2
3
4
A
B
C
Field 3
D a b
( c denotes a space character.)
Downloading a data file PDT 1100 Field 1 4
Field 2
1
2
3
4
1
2
3
4
4
Field 3
A
B
C
D
A
B
C
D
8 a b c a b c is the count byte of a significant data length in a field. 36099026.eps
G-5
Page 339
PDT 1100 Terminal Programmer’s Guide
G-6
Page 340
Appendix H Programming Notes Sleep Timer The sleep timer feature interrupts program execution if the PDT 1100 receives no input within the specified length of time, minimizing power consumption. When input is received, the PDT 1100 resumes the interrupted program execution. Use the OUT statement to set the sleep timer within the range from 0 to 25.5 seconds in increment of 100 ms. The default setting is 1 second. The sleep timer does not work in the following cases: ! ! ! !
! ! ! !
While a communications device file is opened by an OPEN “COM:” statement. During execution of a SEARCH function. When a TIMEA, TIMEB, or TIMEC function returns a nonzero value. When the bar code device file is opened by the OPEN “BAR:” statement under any of the following conditions: " With the continuous reading mode specified " With the momentary switching mode or auto-off mode specified, and with the trigger switch held down " With the alternate switching mode, and the illumination LED on. When any key is held down. When the LCD backlight is on. When the beeper is beeping. When the PDT 1100 is updating data on the screen.
H-1
Page 341
PDT 1100 Terminal Programmer’s Guide
Resume Function The resume function preserves the current status of a running application program (user program or Easy Pack) when the PDT 1100 is powered off, and then resumes it when the PDT 1100 is powered on. If you unintentionally turn off the PDT 1100 or the automatic poweringoff function turns it off, turn on the PDT 1100 again to resume the previous screen and continue the program execution. The resume function is effective during data transmission in an application program, but a few bytes of data may be lost. Note: Powering off the PDT 1100 does not escape from the current status of an executed program because the resume function does not initialize the variables or restart the PDT 1100. (Disable the resume function in System Mode.) The resume function does not work after execution of System Mode or after the following instructions: !
END instruction
!
POWER OFF instruction
!
POWER 0 instruction.
Before you run System Mode, store important information using register variables or other means, or powering the PDT 1100 off and on restarts it.
Low Battery Warning If the battery voltage of dry batteries (or the NiMH battery cartridge) drops below the specified level, the PDT 1100 displays the “Replace the batteries!” message (or “Charge the battery!” message), beeps five times, and then turns off power. (Refer to the PDT 1100 User's Manual.)
H-2
Page 342
Programming Notes
Selecting a Communications Device File The PDT 1100 supports both optical interface and direct-connect interface. Only one can be opened at a time using the OPEN “COM:” statement. OPEN “COM1:” AS # filenumber
For the optical interface
OPEN “COM2:” AS # filenumber
For the direct-connect interface
If you designate “COM:”, the default interface selected on the SET COM menu in System Mode becomes active. If an XFILE instruction is executed, the interface specified by the OPEN “COM:” statement becomes active.
Prohibited Simultaneous Operations To save power at peak load, the beeper, the LASER diode and the LCD backlight do not work simultaneously. The beeper has the highest priority, the LASER diode has the next priority, and the LCD backlight has the lowest priority.
Controlling the LCD Backlight A KEY statement defines the backlight function on/off key and sets the length of backlight ontime. Use the OUT statement to turn the LCD backlight on or off and set the backlight on-time. When the LCD backlight is activated with the OUT statement, pressing the backlight function on/off key cannot turn off the backlight. (Refer to KEY on page 10-61, Appendix D, I/O Ports, and Appendix I, Backlight Function.)
Keyboard (Keypad) The keys on the PDT 1100 are not auto-repeat. The Shift key can be set to non-lock type or lock type by selecting Nonlock or Onetime on the shift key setting menu of the SET SYSTEM screen in System Mode. Non-lock type: The keypad shifts only when the Shift key is held down. ! Lock type: Once the Shift key is pressed, the next key pressed is shifted and the following keys are not shifted. When keys are shifted, the shift-key icon appears at the right end of the bottom line of the LCD if the system status indication is on. (Turn on the system status indication through the SET DISPLAY menu in System Mode or by using the OUT statement.) !
H-3