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 4 of 37

JANUS PSK for Basic, Version 2.1 Reference Manual, pages 31 to 40

Pages 31 to 40 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 31

QuickBasic Library

2

5. Copy RCVINPUT.EXE to your JANUS reader and run the program. This sample program will prompt for input from either the keypad, the scanner, or COM1.

Handling a Linker Error Message You may get a linker error message when you link the QuickBasic program. If you receive the following error message, your program has more segments than the default (128): fatal error L1049:

too many segments

You need to increase the number of segments and link again. To set the number of segments • Enter the following command from the DOS prompt: LINK /SEG:nnn /NOE @progname.RSP where:

nnn is a number between 1 and 16,375.

2-5

Page 32

JANUS PSK for Basic Reference Manual

Building Your Own QuickBasic Program In the following procedure, progname is the name of your program file without an extension. Your source file (*.BAS), object file (*.OBJ), and executable file (*.EXE) all have the same filename. To build a program using QuickBasic 1. Change to the directory containing your program file, progname.BAS. 2. Create a response file, progname.RSP, for linking. The response file consists of the following four lines: progname.OBJ progname (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 program from DOS: BC /T /O progname.BAS, progname, NUL.LST where: /T /O builds a standalone object file to use with BCOM45.LIB.

progname is your program name and the name for the object file, *.OBJ.

4. Link the program from the DOS prompt using the response file: LINK /NOE @progname.rsp where: /NOE searches the object files for public symbols that may be redefined in your program.

5. Copy your program, progname.EXE, to your JANUS reader and run the program.

2-6

Page 33

QuickBasic Library

2

Handling a Linker Error Message You may get a linker error message when you link the QuickBasic program. If you receive the following error message, your program has more segments than the default (128): fatal error L1049:

too many segments

You need to increase the number of segments and link again. To set the number of segments • Enter the following command from the DOS prompt: LINK /SEG:nnn /NOE @progname.RSP where:

nnn is a number between 1 and 16,375.

Debugging With JANUS Application Simulator The JANUS Application Simulator is a terminate-and-stay resident (TSR) program that you use to run JANUS applications on a PC. Without the Simulator, you cannot run JANUS applications on your PC. Whenever you start a program that uses PSK library functions, the program checks for a JANUS reader and for the JANUS Simulator. If you attempt to run a JANUS program on a PC without the Simulator, you get an error message. The Simulator captures the JANUS functions and interrupts to make the PC mimic a JANUS reader. For more information on the Simulator, refer to the JANUS Application Simulator User’s Manual, Part No. 062778. To debug a JANUS application with the Simulator 1. Start the Simulator from the DOS prompt by entering this command: janussim 2. Start QuickBasic. 3. Follow the debugging instructions provided with QuickBasic.

2-7

Page 34

JANUS PSK for Basic Reference Manual

Runtime Requirements For some library functions to work properly, you must install and run specific software components at program execution time. For example, if the reader is using a communications port and you want to use Intermec protocols, you must load a protocol handler. Because protocol handlers use a lot of memory, they are not automatically loaded for you. Other functions require the Reader Wedge.

Protocol Handlers You use the Intermec protocol handler (PHIMEC.EXE) when the reader is connected with other Intermec devices. PHIMEC.EXE works with UserDefined, Point-to-Point, Polling Mode D, and Multi-Drop protocols. You use the PC standard protocol handler (PHPCSTD.EXE) when the reader is connected to devices that use PC standard protocol. PHPCSTD.EXE provides low-level communication abilities and protocol services at the DOS level for non-communication software. It also provides byte-by-byte transfer. If your reader is a radio frequency (RF) unit, RFPH.EXE is automatically loaded. For more information on protocol handlers, refer to your JANUS user’s manual. To install a protocol handler on the reader • From the DOS prompt, enter the following command:

handler n where: handler is either PHIMEC or PHPCSTD. n is the number of the communications port. When your application is finished, the protocol handler TSR continues to run and can prevent other applications from running due to lack of memory. You can unload the protocol handler TSR by adding the unload command as the last line of the batch file that launches your application.

2-8

Page 35

QuickBasic Library

2

To unload a protocol handler on the reader • From the DOS prompt, enter the following command: unload handler n where: handler is the installed handler (PHIMEC or PHPCSTD). n is the number of the communications port.

Reader Wedge Some functions, such as imReceiveInput, allow the reader to receive input from multiple sources and process the input depending on the source. You must load the Reader Wedge (RWTSR.EXE) TSR to use these functions. When your application is finished, the Reader Wedge TSR continues to run and can prevent other applications from running due to lack of memory. You can unload the Reader Wedge TSR by adding the unload command as the last line of the batch file that launches your application. To load the Reader Wedge TSR on the reader • From the DOS prompt, enter the following command: RWTSR To unload the Reader Wedge TSR on the reader • From the DOS prompt, enter the following command: RWTSR -D

2-9

Page 36

JANUS PSK for Basic Reference Manual

Specific Functions With Runtime Requirements The following table lists the PSK functions that have runtime requirements.

Specific Runtime Requirements

2-10

This Function

Requires imCancelRxBuffer

Protocol Handler imCancelTxBuffer

Protocol Handler imCommand

Reader Wedge imGetInputMode

Reader Wedge imGetLabelSymbology

Reader Wedge imGetLength

Reader Wedge imInputStatus

Reader Wedge imIrlA

Reader Wedge imIrlK

Reader Wedge imIrlN

Reader Wedge imIrlV

Reader Wedge If data is from a communications port, use a Protocol Handler and imLinkComm.

imIrlY

Reader Wedge Protocol Handler Use imLinkComm.

imLinkComm

Reader Wedge Protocol Handler imReceiveBuffer

Protocol Handler Will not work if linked.

imReceiveBufferNoprot

Protocol Handler Will not work if linked.

imReceiveBufferNoWait

Protocol Handler Will not work if linked.

imReceiveByte

Protocol Handler You must install PHPCSTD. Will not work if linked.

imReceiveInput

Reader Wedge If data is from a communications port, use a Protocol Handler and imLinkComm.

Page 37

QuickBasic Library

2

Specific Runtime Requirements (continued) This Function

Requires imRxCheckStatus

Protocol Handler imSerialProtocolControl imLinkComm imSetDisplayMode

Reader Wedge imSetInputMode

Reader Wedge imStandbyWait

Reader Wedge imTransmitBuffer

Protocol Handler imTransmitBufferNoprot

Protocol Handler imTransmitBufferNoWait

Protocol Handler imTransmitByte

Protocol Handler You must install PHPCSTD.

imUnlinkComm

Reader Wedge Protocol Handler

Unsupported QuickBasic Functions Your JANUS reader does not support these QuickBasic light pen and joystick functions: ON PEN GOSUB ON STRIG GOSUB PEN PEN ON/OFF/STOP STICK STICKSTRIG STRIG ON/OFF/STOP Your JANUS reader does not support these QuickBasic file functions: LOCK

UNLOCK

2-11

Page 38

JANUS PSK for Basic Reference Manual

Certified QuickBasic Language Functions Because of the large number of functions in the QuickBasic language, not all functions are known to work correctly when used with the Intermec family of PC-compatible readers. Many of these have been tested, however, and are known to operate on the reader the same way as on a PC. These tested functions are listed below. Note: For a list of QuickBasic functions that are compatible with Visual Basic, see your Visual Basic manual.

Tested QuickBasic Functions $DYNAMIC Metacommand

COLOR Statement

DEFLNG Statement

$STATIC Metacommand

COM Statement

DEFSNG Statement

ABS Function

COMMON Statement

DEFSTR Statement

ABSOLUTE Keyword

CONST Statement

DIM Statement

AND Operator

COS Function

DO...LOOP Statement

ANY Keyword

CSNG Function

DOUBLE Keyword

APPEND Keyword

CSRLIN Function

DRAW Statement

AS Keyword

CVD Function

ELSE Keyword

ASC Function

CVSMBF Function

ELSEIF Keyword

ATN Function

CVDMBF Function

END Statement

BASE Keyword

CVI Function

ENVIRON Statement

Basic Character Set

CVL Function

ENVIRON$ Function

BEEP Statement

CVS Function

EOF Function

BINARY Keyword

DATA Statement

EQV Operator

BLOAD Statement

Data Type Keywords

ERASE Statement

Boolean Operators

DATE$ Function

ERDEV Function

BSAVE Statement

DATE$ Statement

ERDEV$ Function

CALL ABSOLUTE Statement

DECLARE Statement

ERL Function

CALL Statement

DEF FN Statement

ERR Function

CASE Keyword

DEF SEG Statement

ERROR Statement

CDBL Function

DEFDBL Statement

EXIT Statement

CHAIN Statement

DEFINT Statement

EXP Function

2-12

Page 39

QuickBasic Library

2

Tested QuickBasic Functions (continued) FIELD Statement

LINE (Graphics) Statement

ON Keyword

FILEATTR Function

LINE INPUT Statement

ON PLAY Statement

FILES Statement

LIST Keyword

ON TIMER Statement

FIX Function

LOC Function

ON...GOSUB Statement

FOR...NEXT Statement

LOCATE Statement

ON...GOTO Statement

FRE Function

LOF Function

OPEN Statement

FREEFILE Function

LOG Function

OPTION BASE Statement

FUNCTION Statement

LONG Keyword

OR Operator

GET (File I/O) Statement

LOOP Keyword

OUT Statement

GET (Graphics) Statement

LPOS Function

OUTPUT Keyword

GOSUB Statement

LPRINT Statement

PAINT Statement

GOTO Statement

LPRINT USING Statement

PEEK Function

HEX$ Function

LSET Statement

PLAY (Event Trapping) Statements

IF...THEN...ELSE Statement

LTRIM$ Function

PLAY (Music) Statement

IMP Operator

MID$ Function

PLAY Function

INKEY$ Function

MKD$ Function

PMAP Function

INP Function

MKDIR Statement

POINT Function

INPUT Statement

MKDMBF$ Function

POKE Statement

INPUT$ Function

MKI$ Function

POS Function

INSTR Function

MKL$ Function

PRINT Statement

INT Function

MKS$ Function

PRINT USING Statement

INTEGER Keyword

MKSMBF$ Function

PSET Statement

IS Keyword

MOD Operator

PUT (File I/O) Statement

KEY (Assignment) Statement

NAME Statement

PUT (Graphics) Statement

KEY (Event Trapping) Statement

NEXT Keyword

RANDOM Keyword

KILL Statement

NOT Operator

RANDOMIZE Statement

LBOUND Function

OCT$ Function

READ Statement

LCASE$ Function

OFF Keyword

REDIM Statement

LEFT$ Function

ON COM Statement

REM Statement

LEN Function

ON ERROR Statement

RESET Statement

LET Statement

ON KEY Statement

RESTORE Statement

2-13

Page 40

JANUS PSK for Basic Reference Manual

Tested QuickBasic Functions (continued) RESUME Statement

SYSTEM Statement

RETURN Statement

TAB Function

RIGHT$ Function

TAN Function

RMDIR Statement

THEN Keyword

RND Function

TIME$ Function

RSET Statement

TIME$ Statement

RTRIM$ Function

TIMER Function

RUN Statement

TIMER Statements

SCREEN Function

TO Keyword

SCREEN Statement

TROFF Statement

SEEK Function

TRON Statement

SEEK Statement

TYPE Statement

SELECT CASE Statement

UBOUND Function

SGN Function

UCASE$ Function

SHARED Statement

UNTIL Keyword

SHELL Statement

USING Keyword

SIN Function

VAL Function

SINGLE Keyword

VARPTR Function

SLEEP Statement

VARPTR$ Function

SOUND Statement

VARSEG Function

SPACE$ Function

VIEW PRINT Statement

SPC Function

VIEW Statement

SQR Function

WAIT Statement

STATIC Statement

WHILE...WEND Statement

STEP Keyword

WINDOW Statement

STOP Statement

WRITE Statement

STR$ Function

XOR Operator

STRING Keyword STRING$ Function SUB Statement SWAP Statement

2-14