17.08.2013 Views

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

COMSET, <strong>cont'd</strong>.<br />

Chapter 2 Program Instructions<br />

Remarks, <strong>cont'd</strong>. The reception of data to the buffer can be interrupted by four conditions:<br />

• An end string being encountered.<br />

• An attention string being encountered.<br />

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

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

COM ERROR ON/OFF) and an communication error occurs. This condition<br />

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

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

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

a COMBUF$ function. After the reception has been interrupted, an ON<br />

COMSET GOSUB statement can be issued to control what will happen next.<br />

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

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

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

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<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 44

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

Saved successfully!

Ooh no, something went wrong!