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.

COM ERROR ON/OFF<br />

Chapter 2 Program Instructions<br />

Field of Application Statement enabling/disabling error handling on the specified<br />

communication channel.<br />

Syntax COM ERRORON|OFF<br />

↔<br />

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

1 = "uart1:"<br />

2 = "uart2:"<br />

3 = "uart3:"<br />

4 = "centronics:"<br />

Default: COM ERROR OFF on all channels.<br />

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

COMSET ON, COMSET OFF, COM STAT and COMBUF$.<br />

Each character received is checked for the following errors:<br />

• Received break<br />

• Framing error<br />

• Parity Error<br />

• Overrun error<br />

If any such communication error occurs and COM ERROR is ON for the<br />

channel in question, the reception will be interrupted. This condition can be<br />

read by means of a COMSTAT function, but you cannot read exactly what<br />

type of error has occurred. COM ERROR OFF disables this type of errorhandling<br />

for the specified channel.<br />

Example In this example, a message will appear on the screen when the reception is<br />

interrupted by any of four COMSET conditions being fulfilled:<br />

10 COM ERROR 1 ON<br />

20 A$="Max. number of char. received"<br />

30 B$="End char. received"<br />

40 C$="Attn. string received"<br />

50 D$="Communication error"<br />

60 COMSET 1, "A",CHR$(90),"#","BREAK",20<br />

70 ON COMSET 1 GOSUB 1000<br />

80 COMSET 1 ON<br />

90 IF QDATA$="" THEN GOTO 90<br />

100 END<br />

1000 QDATA$=COMBUF$(1)<br />

1010 IF COMSTAT(1) AND 2 THEN PRINT A$<br />

1020 IF COMSTAT(1) AND 4 THEN PRINT B$<br />

1030 IF COMSTAT(1) AND 8 THEN PRINT C$<br />

1040 IF COMSTAT(1) AND 32 THEN PRINT D$<br />

1050 PRINT QDATA$:RETURN<br />

<strong>Intermec</strong> Fingerprint 7.2 – Reference Manual Ed. 3 41

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

Saved successfully!

Ooh no, something went wrong!