17.08.2013 Views

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

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.

COMBUF$<br />

Chapter 2 Program Instructions<br />

Field of Application Function reading the data in the buffer of the specified communication<br />

channel.<br />

Syntax COMBUF$()<br />

is one of the following communication channels:<br />

1 = "uart1:"<br />

2 = "uart2:"<br />

3 = "uart3:"<br />

4 = "centronics:"<br />

Remarks This function is closely related to COMSET, ON COMSET GOSUB,<br />

COMSET ON, COMSET OFF, COM ERROR ON/OFF and COMSTAT.<br />

Using COMBUF$, the buffer can be read and the content be used in your<br />

program.<br />

When the communication has been interrupted by any of the three conditions<br />

"end character", "attention string", or "max. no. of char." (see COMSET), you<br />

may use an ON COMSET GOSUB subroutine and assign the data from the<br />

buffer to a variable as illustrated in the example below.<br />

Note that COMBUF$ filters out any incoming ASCII 00 dec. characters<br />

(NUL).<br />

Example In this example, the data from the buffer is assigned to the string variable A$<br />

and printed on the screen:<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<br />

.....<br />

.....<br />

COMSET 1 OFF<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 7.2 – Reference Manual Ed. 3 42

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

Saved successfully!

Ooh no, something went wrong!