The text of a manual · part 31 of 37
JANUS PSK for Basic, Version 2.1 Reference Manual, pages 301 to 310
Pages 301 to 310 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 301
imTransmitByte – Visual Basic
3
Example '**************** imTransmitByte ******************* REM $INCLUDE: 'im20vbas.bi' PRINT "imTransmitByte" ' If the Mode command is used, DO NOT install the Phpcstd protocol ' If the Phpcstd protocol is installed DO NOT use the mode commmand ' Set up comm port SHELL "MODE COM1:9600 E 7 1" ' Get keypad char and transmit to COM1 DO outstr$ = INKEY$ IF outstr$ <> "" THEN ' Call Intermec function status% = imTransmitByte (imCom1, SADD(outstr$)) PRINT USING "!"; outstr$; END IF ' Loop until Esc is pressed LOOP UNTIL outstr$ = CHR$(27) PRINT "status = ", HEX$(status%) PRINT "Press any key" PRINT " to continue" END
3-135
Page 302
imUnlinkComm – Visual Basic imUnlinkComm Purpose:
This function removes the link between the Reader Wedge function and a designated communications port. After this function excutes, the Reader Wedge is not notified of receive buffer functions. You only need to use this procedure one time, at the end of your program.
Syntax:
REM $INCLUDE: 'im20vbas.bi' FUNCTION ImUnLinkComm%(PortID)
IN Parameters:
The PortID parameter identifies the communications port as follows: imCom1 imCom2 imCom4
COM1 COM2, scanner port (2010 and 2050) COM4 (RF only)
OUT Parameters:
None.
Return Value:
This function returns one of the standard status codes defined in Appendix A, “Status Codes.”
Notes:
You must install a protocol handler to use this function. You must install the Reader Wedge to use this function. For information on loading RWTSR.EXE, see “Runtime Requirements” earlier in this chapter.
See Also:
imLinkComm
Example See example for imReceiveInput, imIrlY, and imSerialProtocolControl.
3-136
Page 303
imViewportEnd – Visual Basic
3 imViewportEnd Purpose:
This function sets the viewport to the lower right corner (end) of the virtual display.
Syntax:
REM $INCLUDE: 'im20vbas.bi' SUB imViewportEnd ()
IN Parameters:
None.
OUT Parameters:
None.
Return Value:
None.
Notes:
This function has no effect on the JANUS 2050.
See Also:
imCursorToViewport, imViewportHome, imViewportPageDown, imViewportPageUp, imViewportToCursor, imViewportMove
Example '**************** imViewportEnd ******************** REM $INCLUDE: 'im20vbas.bi' ' Set viewport to lower right corner imViewportEnd SLEEP 5 END
3-137
Page 304
imViewportGetxy – Visual Basic imViewportGetxy Purpose:
This function retrieves the column and row of the upper left corner of the viewport.
Syntax:
REM $INCLUDE: 'im20vbas.bi' FUNCTION imViewportGetxy% (VARPTR(Row), VARSEG(Row), VARPTR(Column), VARSEG(Column))
IN Parameters:
None.
OUT Parameters:
The Row parameter returns the row value (Y-coordinate) of the viewport. The Column parameter returns the column value (X-coordinate) of the viewport.
Return Value:
This function returns one of the standard status codes defined in Appendix A, “Status Codes.”
Notes:
This function is valid only when the display is in 80 x 25 mode. This function has no effect on the JANUS 2050.
See Also:
imViewportSetxy, imViewportMove, imViewportPageUp, imViewportPageDown, imViewportToCursor, imViewportEnd, imViewportHome
Example '**************** imViewportGetxy ****************** REM $INCLUDE: 'im20vbas.bi' row% = 3 col% = 3 status% = imViewportSetxy(VARPTR(row%), VARSEG(row%), VARPTR(col%), VARSEG(col%)) print "Row =";row% print "Col =";col% input "Waiting>>",response$ status% = imViewportGetxy((VARPTR(row%), VARSEG(row%), VARPTR(col%), VARSEG(col%) print "Row =";row% print "Col =";col% END
3-138
Page 305
imViewportHome – Visual Basic
3 imViewportHome Purpose:
This function sets the viewport to the upper left corner (home) of the virtual display.
Syntax:
REM $INCLUDE: 'im20vbas.bi' SUB imViewportHome ()
IN Parameters:
None.
OUT Parameters:
None.
Return Value:
None.
Notes:
This function has no effect on the JANUS 2050.
See Also:
imCursorToViewport, imViewportEnd, imViewportPageDown, imViewportPageUp, imViewportToCursor, imViewportMove
Example '**************** imViewportHome ******************** REM $INCLUDE: 'im20vbas.bi' ' Home imViewportHome SLEEP 5 END
3-139
Page 306
imViewportMove – Visual Basic imViewportMove Purpose:
This function moves the viewport the specified distance and direction.
Syntax:
REM $INCLUDE: 'im20vbas.bi' FUNCTION imViewportMove% (Direction, Distance, VARPTR(Row), VARSEG(Row), VARPTR(Column), VARSEG(Column))
IN Parameters:
The Direction parameter is one of these constants: imViewportLeft imViewportRight imViewportUp imViewportDown
Move left Move right Move up Move down
The Distance parameter indicates the number of units to move the viewport and is either a numeric value between 1 and 70 or is imDefaultDistance. If the distance parameter is imDefaultDistance, the default step size is used. The distance moved is a configurable parameter. For more information on configuring the viewport, see your JANUS user’s manual. OUT Parameters:
The Row parameter returns the row number to which the viewport has moved. The Column parameter returns the column number to which the viewport has moved.
Return Value:
This function returns one of the standard status codes defined in Appendix A, “Status Codes.”
Notes:
The (Row, Column) pair represents the upper left corner of the viewport being displayed. The minimum value for both the Row and Column is (0,0), which is the upper left corner of the virtual window. The maximum value is determined by the video mode and the number of lines and columns displayed.
3-140
Page 307
imViewportMove – Visual Basic
3
For example, for the normal video mode 3 (80 x 25 display) with a 20 x 16 display size, the maximum value of Row is 9 (25 minus 16) and the maximum value of Column is 60 (80 minus 20). The Row and Column viewport settings are set to the maximum allowed for the current mode and display size. To determine the actual values set, check the returned values of Row and Column. This function has no effect on the JANUS 2050. See Also:
imViewportEnd, imViewportHome, imViewportPageDown, imViewportPageUp, imViewportToCursor, imCursorToViewport
Example '**************** imViewportMove ******************* REM $INCLUDE: 'im20vbas.bi' ' Viewport move ' Prompt for direction, distance INPUT "Enter direction ", direction% INPUT "Enter distance ",distance% status% = imViewportMove (direction%, distance%, VARPTR(dpRow%), VARSEG(dpRow%), VARPTR(dpColumn%), VARSEG(dpColumn%)) PRINT "RVP move status = " PRINT " ", HEX$(status%) PRINT "Row ", dpRow% PRINT "Col ", dpColumn% SLEEP 5 END
3-141
Page 308
imViewportPageDown – Visual Basic imViewportPageDown Purpose:
This function moves the viewport down one viewport length.
Syntax:
REM $INCLUDE: 'im20vbas.bi' SUB imViewportPageDown ()
IN Parameters:
None.
OUT Parameters:
None.
Return Value:
None.
Notes:
This function has no effect on the JANUS 2050.
See Also:
imCursorToViewport, imViewportEnd, imViewportHome, imViewportPageUp, imViewportToCursor, imViewportMove
Example '**************** imViewportPageDown *************** REM $INCLUDE: 'im20vbas.bi' ' Down one viewport length imViewportPageDown SLEEP 5 END
3-142
Page 309
imViewportPageUp – Visual Basic
3 imViewportPageUp Purpose:
This function moves the viewport up one viewport length.
Syntax:
REM $INCLUDE: 'im20vbas.bi' SUB imViewportPageUp ()
IN Parameters:
None.
OUT Parameters:
None.
Return Value:
None.
Notes:
This function has no effect on the JANUS 2050.
See Also:
imCursorToViewport, imViewportEnd, imViewportHome, imViewportPageDown, imViewportToCursor, imViewportMove
Example '**************** imViewportPageUp ***************** REM $INCLUDE: 'im20vbas.bi' ' Up one viewport length imViewportPageUp SLEEP 5 END
3-143
Page 310
imViewportSetxy – Visual Basic imViewportSetxy Purpose:
This function sets the viewport row and column to a specific value when moving between two screens.
Syntax:
REM $INCLUDE: 'im20vbas.bi' FUNCTION imViewportSetxy% (VARPTR(Row), VARSEG(Row), VARPTR(Column), VARSEG(Column))
IN/OUT Parameters:
The Row parameter sets the row value (Y-coordinate) of the viewport.
Return Value:
This function returns one of the standard status codes defined in Appendix A, “Status Codes.”
Notes:
The (Row, Column) pair represents the upper left corner of the viewport being displayed.
The Column parameter sets the column value (X-coordinate) of the viewport.
The minimum value for both the Row and Column is (0,0), which is the upper left corner of the virtual window. The maximum value is determined by the video mode and the number of lines and columns displayed. For example, for the normal video mode 3 (80 x 25 display) with a 20 x 16 display size, the maximum value of Row is 9 (25 minus 16) and the maximum value of Column is 60 (80 minus 20). The Row and Column viewport settings are set to the maximum allowed for the current mode and display size. To determine the actual values set, check the returned values of Row and Column. This function has no effect on the JANUS 2050. See Also:
3-144 imViewportMove