02.10.2012 Views

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter —Program Instructions<br />

COMSET, cont.<br />

The reception of data to the buffer can be interrupted by four conditions:<br />

• If an end string being encountered.<br />

• If an attention string being encountered.<br />

• If the maximum number of characters being received.<br />

• If error-handling is enabled for the communication channel in question<br />

(see COM ERROR ON/OFF) and an communication error occurs.<br />

This condition can be checked by a COMSTAT function.<br />

Any interruption will have a similar effect as a COMSET OFF statement,<br />

that is close the reception, but the buffer will not be emptied and can still<br />

be read by a COMBUF$ function. After the reception has been interrupted,<br />

an ON COMSET GOSUB statement can be issued to control what<br />

will happen next.<br />

COMSET does not support auto-hunting (see SETSTDIO).<br />

Example This example shows how "uart1:" is opened for background communication.<br />

Any record starting with the character # and ending with the character<br />

& will be received. The characters Z, Y and X will be ignored. The<br />

character = will stop the reception. Max. 50 characters are allowed.<br />

1 REM Exit program with #STOP&<br />

10 COMSET1,"#","&","ZYX","=",50<br />

20 ON COMSET 1 GOSUB 2000<br />

30 COMSET 1 ON<br />

40 IF A$ "STOP" THEN GOTO 40<br />

50 COMSET 1 OFF<br />

.....<br />

.....<br />

1000 END<br />

2000 A$= COMBUF$(1)<br />

2010 PRINT A$<br />

2020 COMSET 1 ON<br />

2030 RETURN<br />

<strong>Intermec</strong> Fingerprint <strong>v8.70.0</strong>/v10.0.0 Programmer´s <strong>Reference</strong> <strong>Manual</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!