Programming instructions

Intermec Fingerprint v7.61 Programmers Reference Manual Ed. 7 47
Chapter 2 Program Instructions
COMSET, cont.
Remarks, cont.
The reception of data to the buffer can be interrupted by four conditions:
An end string being encountered.
An attention string being encountered.
The maximum number of characters being received.
If error-handling is enabled for the communication channel in question
(see COM ERROR ON/OFF) and an communication error occurs. This
condition can be checked by a COMSTAT function.
Any interruption will have a similar effect as a COMSET OFF statement,
that is close the reception, but the buffer will not be emptied and can
still be read by a COMBUF$ function. After the reception has been
interrupted, an ON COMSET GOSUB statement can be issued to control
what will happen next.
COMSET does not support auto-hunting (see SETSTDIO).
Example
This example shows how "uart1:" is opened for background communication.
Any record starting with the character # and ending with the character & will
be received. The characters Z, Y and X will be ignored. The character = will
stop the reception. Max. 50 characters are allowed.
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