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 37

JANUS PSK for Basic, Version 2.1 Reference Manual, pages 21 to 30

Pages 21 to 30 of 362

The original document is the PDF (601 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 Intermec J2020, Intermec J2010 and Intermec J2050

Page 21

Getting Started

1

This chapter briefly describes the programming methods and capabilities that apply to the JANUS family of readers and explains how to install the PSK.

What Your JANUS Reader Can Do

JR2010 JR2020

Your JANUS reader is a portable, programmable bar code reader and a 386-based computer in one. Each reader has the Intermec controlled BIOS and Microsoft ROM DOS 5.0. The reader behaves and functions like a normal PC with 640K of memory, with these exceptions: • The JANUS 2010 and 2020 are hand-held, with a small LCD display, custom keyboard, and either a port for a bar code input device or a built-in scanner.

I/O

Co nn Da ta

Ct rl Al t

Sh ift Ca ps

• The JANUS 2050 is mounted to a vehicle, such as a forklift, and has a monochrome CGA display, custom keyboard, built-in RF, and a port for a bar code input device.

f

TM

~

A

_

G

-

`

"

B

+

H

=

F6

{

C

M

[

I

' \

J

]

P

>

V

.

<

O T

Y

}

F7

E

N S

F1

D

,

U Z Ctr l Alt

F2

: F8

F K

;

Q

?

W

/ ho &

Cap s

F3 me F9

7

L

+

F4

*

-

8

$

R

4 en

* % d

X

5

! en

1

@ f ter ins sp ac e

2

)

0 pg

F1

0 up

( pg

6 dn

#

3 de l

Es

> c

.

J2050

F5

9 / ^ nu m loc k en ter

JPSK.001

• The operating system and protocol support programs reduce the memory available for your application to about 450K.

You can run batch programs and copy, name, or move files in the same manner as you would with any normal PC. The only difference is that the JANUS reader has ROM and RAM drives and a PC card drive. You can also run DOS-based programs on the reader the same as you can on a PC. When you do, the reader behaves like a PC, but has the advantage of accepting bar code input as if it came from the keypad. If you are an experienced PC programmer, you have already written programs that will run on the reader.

1-3

Page 22

JANUS Programmer’s Software Kit for Basic Reference Manual

Virtual Wedge The Virtual Wedge feature of the reader allows application programs to receive decoded bar codes from the keyboard buffer. The Virtual Wedge makes the reader functionally equivalent to a reader wedge connected to a PC. Bar code input is inserted into the PC keyboard buffer as if entered from the keypad. The Virtual Wedge also allows rapid porting of PC applications to the reader. Note: If your PC application follows MS-DOS programming conventions, it should run correctly on the JANUS reader. Not all programming languages, especially database languages, follow these conventions. If your PC application does not follow MS-DOS programming conventions, your scanned input will be incorrect. Valid configuration commands and reader commands are not put into the keyboard buffer. Bar code configuration commands beginning with $+ are tagged as configuration commands by the Virtual Wedge and sent to the configuration manager to reconfigure the reader. The command parser in the Virtual Wedge software recognizes and processes reader commands. You can run applications that use the Virtual Wedge (instead of Intermec interrupt extensions or function libraries) on either the reader or on your PC.

1-4

Page 23

Getting Started

1

Reader Services Reader services include several functions ranging in complexity from controlling the reader beeper to controlling the function of the power management software. With reader services, you can easily use bar code input from a wand or scanner by using the direct program interface to handle the functions of the reader keyboard, display, and beeper. There are two methods for incorporating the reader services into your programs: • Using function libraries • Using software interrupts You can use either one or a combination of both methods. Note: Do not run programs that use PSK library functions on your PC, unless you have the JANUS Application Simulator installed. If you attempt to run these programs without the Simulator, you will receive an error message and the program will not run.

CAUTION

Caution Do not run programs that use Intermec-specific interrupt extensions on your PC, unless you have the JANUS Application Simulator installed. If you attempt to run these programs without the Simulator, they will cause your PC to lock up and possibly corrupt your system BIOS. Conseil N’exécutez pas de programmes utilisant des extensions d’interruption spécifiques à Intermec sur votre PC, à moins que JANUS Application Simulator soit installé. Si vous tentez de les exécuter sans le Simulator, ces programmes risquent de verrouiller votre PC et d’altérer le BIOS de votre système.

1-5

Page 24

JANUS Programmer’s Software Kit for Basic Reference Manual

Function Libraries You can use a supported language and its associated function libraries to access reader services. The term supported language describes a language that has extensive Intermec-supplied library functions that control reader services. The supported language functions are stored in libraries contained on the Programmer’s Software Kit Language Libraries disk that is provided with this manual. At the time of printing, the list of supported languages includes: • Borland C/C++ • Microsoft C/C++ • Microsoft Visual C/C++ • Microsoft QuickBasic • Microsoft Visual Basic for MS-DOS • Janus/Ada When you write applications in one of the supported languages, link your program to the library for your chosen language by including the header files in your program, and then invoke the reader services using the language-specific reader service commands. The Intermec-specific functions are documented in Chapter 2, “QuickBasic Language Support,” and Chapter 3, “Visual Basic Language Support.” Both C/C++ and Ada support are completely explained in separate manuals. For more information, refer to the following manuals: • JANUS PSK for C/C++ Reference Manual, P/N 062133 • JANUS PSK for Ada Reference Manual, P/N 062038

Software Interrupts The reader supports special software interrupts in addition to those available on a normal PC. If your programming language supports software interrupts, you can write applications that use the reader services. However, it is much easier to use the PSK library functions. Interrupts are a very low-level method of controlling a computer. Programming with interrupts is more difficult than with a high-level language (such as Ada, C, or Basic).

1-6

Page 25

Getting Started

1

Some of the most popular languages have built-in commands for triggering software interrupts (Microsoft C, Borland C++, and QuickBasic, for example). Languages that do not have built-in interrupt commands sometime allow you to access interrupts by embedding fragments of assembly language inside your program. There are other methods for triggering software interrupts, and you can generate software interrupts from almost any language. For complete descriptions and examples of the software interrupts that govern reader services, see Chapter 3, “Software Interrupts,” and Appendix B, “Sample Interrupt Programs,” in the JANUS PSK for C/C++ Reference Manual, P/N 06213.

CAUTION

Caution Do not run programs that use Intermec-specific interrupt extensions on your PC, unless you have the JANUS Application Simulator installed. If you attempt to run these programs without the Simulator, they will cause your PC to lock up and possibly corrupt your system BIOS. Conseil N’exécutez pas de programmes utilisant des extensions d’interruption spécifiques à Intermec sur votre PC, à moins que JANUS Application Simulator soit installé. Si vous tentez de les exécuter sans le Simulator, ces programmes risquent de verrouiller votre PC et d’altérer le BIOS de votre système.

1-7

Page 26

JANUS Programmer’s Software Kit for Basic Reference Manual

Installing the Programmer’s Software Kit The files on the Programmer’s Software Kit Language Libraries disk are distributed in several subdirectories, each corresponding to the supported language: Subdirectory Name

Language

INTERMEC\BORLANDC

Borland C/C++

INTERMEC\MICROSFT

Microsoft C/C++ and Visual C/C++

INTERMEC\QUICKB

Microsoft QuickBasic

INTERMEC\VBDOS

Visual Basic for DOS

INTERMEC\ADA

Janus/Ada

The exact contents of the PSK Language Libraries disk is listed in the README.TXT file contained on the disk. To use the library functions, install the correct files on your computer. You can also use the DOS copy command to copy only the specific files you are sure you will need. Note: If you have an existing Intermec directory, the installation process will update any files in the existing Intermec directory with the newer version files having the same name. To install the library files 1. Insert the PSK Language Libraries disk into the disk drive on your PC. 2. Change to the appropriate disk drive. For example, type A:. 3. Enter the following command: INSTALL dirname drive where: dirname is either BORLANDC, MICROSFT, QUICKB, VBDOS, or ADA, depending on which programming language you need. drive is the location where you want to install the utilities library. If you omit the drive, drive C is assumed.

1-8

Page 27

nugget code39 helconital

2 QuickBasic Library

Page 28

nugget code39 helconital

Page 29

QuickBasic Library

2

This chapter describes how to write applications in QuickBasic using the PSK library functions.

Building a Program Using Microsoft QuickBasic The PSK QuickBasic functions are designed to work with the Microsoft BCOM45.LIB QuickBasic library. When writing your programs, use standard QuickBasic programming techniques. The following procedures shows you how to compile and link a QuickBasic program that uses the QuickBasic library functions you installed from the PSK disk. In the first procedure, you will use one of the example programs. In the second procedure, you compile and link your own program. Keep the following tips in mind when you build QuickBasic programs: • Refer to your QuickBasic user’s guide for information on using BC.EXE and LINK.EXE. • Both C and QuickBasic use the BC.EXE and LINK.EXE commands. If you have C and QuickBasic installed, run these command from the QuickBasic directory or make sure that your QuickBasic directory comes before your C directory in your path. • You must build a standalone executable program.

2-3

Page 30

JANUS PSK for Basic Reference Manual

Building the QuickBasic Sample Program The following procedure uses the sample program file RCVINPUT.BAS. The source file (*.BAS), object file (*.OBJ), and executable file (*.EXE) all have the same filename. To build the RCVINPUT.BAS sample program 1. When you installed the PSK, the following files were copied into \INTERMEC\QUICKB. Create a new subdirectory and copy these files into it: RCVINPUT.BAS IM20BAS1.BI

Sample program demonstrating imReceiveInput Include file for PSK functions

2. In the same subdirectory, create a response file, RCVINPUT.RSP, for linking. The response file consists of the following four lines: RCVINPUT.OBJ RCVINPUT (a blank line) C:\INTERMEC\QUICKB\LIB\IM20_BAS.LIB

C:\QB45\BCOM45.LIB where: the first line lists the program file and its path. the second line lists only the executable filename with no extension. the third line is left blank. the fourth line lists the library files, including their path. 3. Compile the sample program from DOS: BC /T /O RCVINPUT.BAS, RCVINPUT, NUL.LST where: /T /O builds a standalone object file to use with BCOM45.LIB.

4. Link the sample program from the DOS prompt: LINK /NOE @RCVINPUT.RSP where: /NOE

2-4 searches the object files for public symbols that may be redefined in your program.