The text of a manual · part 19 of 37
JANUS PSK for Basic, Version 2.1 Reference Manual, pages 181 to 190
Pages 181 to 190 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 181
Visual Basic Library
3
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
3-15
Page 182
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
3-16
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 183
Visual Basic Library
3
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
Certified Basic Language Functions The Visual Basic PSK functions are derived from the QuickBasic and C/C++ functions. For a complete list of tested QuickBasic functions, see “Certified QuickBasic Language Functions” in Chapter 2. Refer to your Visual Basic reference manual for a list of QuickBasic functions that Visual Basic does not support.
3-17
Page 184
JANUS PSK for Basic Reference Manual
Visual Basic Functions The following pages list the Basic functions available in the PSK, along with notes on syntax and examples of how to use each function. 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.
3-18
Page 185
Visual Basic Library
3
Visual Basic Functions Listed by Category Communications imCancelRxBuffer, 3-26 imCancelTxBuffer, 3-28 imLinkComm, 3-80 imProtocolExtendedStatus, 3-88 imReceiveBuffer, 3-91 imReceiveBufferNoprot, 3-94 imReceiveBufferNoWait, 3-97 imReceiveByte, 3-100 imRxCheckStatus, 3-106 imSerialProtocolControl, 3-107 imTransmitBuffer, 3-128 imTransmitBufferNoprot, 3-132 imTransmitBufferNoWait, 3-130 imTransmitByte, 3-134 imUnlinkComm, 3-136
Display imBacklightOff, 3-23 imBacklightOn, 3-24 imBacklightToggle, 3-25 imDecreaseContrast, 3-33 imGetContrast, 3-37 imGetDisplayMode, 3-41 imGetDisplayType, 3-43 imGetFollowCursor, 3-44 imIncreaseContrast, 3-55 imSetContrast, 3-110 imSetDisplayMode, 3-113 imSetFollowCursor, 3-119
Input imGetInputMode, 3-45 imGetLabelSymbology, 3-48 imGetLength, 3-49 imGetPostamble, 3-50 imGetPreamble, 3-51 imInputStatus, 3-57 imReceiveByte, 3-100 imReceiveInput, 3-102 imSetInputMode, 3-120
Irl imIrlA, 3-59 imIrlK, 3-64 imIrlN, 3-68 imIrlV, 3-73 imIrlY, 3-77
Keypad imGetKeyclick, 3-47 imGetWarmBoot, 3-54 imNumberPadOff, 3-83 imNumberPadOn, 3-84 imSetControlKey, 3-112 imSetKeyclick, 3-122 imSetWarmBoot, 3-124
Program control imApplBreakStatus, 3-21 imStandbyWait, 3-127
3-19
Page 186
JANUS PSK for Basic Reference Manual
Sound imSound, 3-125
System imCommand, 3-30 imGetConfigInfo, 3-35 imMessage, 3-82 imPowerStatus, 3-86 imRsInstalled, 3-105
Viewport imGetViewportLock, 3-52 imCursorToViewport, 3-32 imSetViewportLock, 3-123 imViewportEnd, 3-137 imViewportGetxy, 3-138 imViewportHome, 3-139 imViewportMove, 3-140 imViewportPageDown, 3-142 imViewportPageUp, 3-143 imViewportSetxy, 3-144
3-20
Page 187
imApplBreakStatus – Visual Basic
3 imApplBreakStatus Purpose:
This function checks whether the application break sequence has been pressed. All PSK functions are terminated when the application break sequence is keyed in. Place calls to this function at strategic locations in your program to detect when a user wants to break out of a loop. Your program can determine what action to take when the break sequence is detected.
Syntax:
REM $INCLUDE: ’im20vbas.bi’ FUNCTION imApplBreakStatus% (VARPTR(BreakStatus), VARSEG(BreakStatus))
IN Parameters:
None.
OUT Parameters:
The BreakStatus parameter returns a nonzero value if the break status bit is set and zero if it is not set.
Return Value:
This function returns one of the standard status codes defined in Appendix A, “Status Codes.”
Notes:
The BreakStatus flag is reset each time the routine is called. Because this function is also called during the input routines provided in the library, you should check the return code from input functions for the hex value 8515H. This value indicates that the input function has terminated because the application break sequence was entered. In this case, BreakStatus is cleared by the input function’s call to imApplBreakStatus. To enter an application break sequence 1. Press 2. Press 3. Press 4. Press q n2g 1 q to turn off the reader. -
- at the same time.
. This sets the reader’s application break bit.
to turn on the reader.
3-21
Page 188
imApplBreakStatus – Visual Basic
Example ’**************** imApplBreakStatus **************** REM $INCLUDE: ’im20vbas.bi’ ’ Initializing Variables Brk% = 0 Temp$ = "" ’ Clear the screen CLS ’ Press the following sequence to set the application break on: ’ I/O key (Turn OFF the reader) ’ F3+2+LeftArrow (Press F3, 2, and left arrow at the same time) ’ 1 (Press the 1 key to set application break bit) ’ I/O key (Turn the reader ON) WHILE Temp$ <> "q" ’
Check the application break status status% = imApplBreakStatus (VARPTR(Brk%), VARSEG(Brk%)) IF Brk% THEN PRINT "App Brk is ON" ELSE PRINT "App Brk is OFF" END IF
PRINT PRINT "Press any key to continue, " PRINT "’q’ for quit: " PRINT PRINT Temp$ = INPUT$(1) WEND END
3-22
Page 189
imBacklightOff – Visual Basic
3 imBacklightOff Purpose:
This function turns the display backlight off. Turn the backlight off to prolong the reader’s battery life.
Syntax:
REM $INCLUDE: ’im20vbas.bi’ SUB imBacklightOff()
IN Parameters:
None.
OUT Parameters:
None.
Return Value:
None.
Notes:
You can program the backlight to automatically turn off after a specified time to save battery power. The length of time depends on the backlight timeout configuration parameter. The configuration parameter is set in 1 second increments. The default is 10 seconds. This function has no effect on the JANUS 2050.
See Also:
imBacklightOn, imBacklightToggle
Example ’**************** imBacklightOff ******************* REM $INCLUDE: ’im20vbas.bi’ ’ Backlight off CALL imBacklightOff PRINT "Backlight off" END
3-23
Page 190
imBacklightOn – Visual Basic imBacklightOn Purpose:
This function turns the display backlight on to illuminate the reader display in dimly lit environments.
Syntax:
REM $INCLUDE: ’im20vbas.bi’ SUB imBacklightOn()
IN Parameters:
None.
OUT Parameters:
None.
Return Value:
None.
Notes:
You can program the backlight to automatically turn off after a specified time to save battery power. The length of time depends on the backlight timeout configuration parameter. The configuration parameter is set in 1 second increments. The default is 10 seconds. This function has no effect on the JANUS 2050.
See Also:
imBacklightOff, imBacklightToggle
Example ’**************** imBacklightOn ******************** REM $INCLUDE: ’im20vbas.bi’ ’ Backlight on CALL imBacklightOn PRINT "Backlight on " END
3-24