Programming instructions
Intermec Fingerprint v7.61 – Programmer’s Reference Manual Ed. 7 45
Chapter 2 Program Instructions
COMBUF$
Field of Application
Function reading the data in the buffer of the communication channel
specifi ed by a COMSET statement.
Syntax COMBUF$(<nexp>)
<nexp> is one of the following communication channels:
1 = "uart1:"
2 = "uart2:"
3 = "uart3:"
4 = "centronics:"
5 = "net1:"
6 = "usb1:"
Remarks
This function is closely related to COMSET, ON COMSET GOSUB,
COMSET ON, COMSET OFF, COM ERROR ON/OFF, and COMSTAT.
Using COMBUF$, the buffer can be read and the content be used in
your program.
When the communication has been interrupted by any of the three conditions
"end character", "attention string", or "max. no. of char." (see COMSET), you
may use an ON COMSET GOSUB subroutine and assign the data from the
buffer to a variable as illustrated in the example below.
Note that COMBUF$ fi lters out any incoming ASCII 00 dec. characters
(NUL).
Example
In this example, the data from the buffer is assigned to the string variable
A$ and printed on the screen:
1 REM Exit program with #STOP&
10 COMSET1,"#","&","ZYX","=",50
20 ON COMSET 1 GOSUB 2000
30 COMSET 1 ON
40 IF A$ <> "STOP" THEN GOTO 40
50 COMSET 1 OFF
.....
.....
1000 END
2000 A$= COMBUF$(1)
2010 PRINT A$
2020 COMSET 1 ON
2030 RETURN