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

Create successful ePaper yourself

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

ON COMSET GOSUB<br />

Chapter —Program Instructions<br />

Purpose Statement for branching to a subroutine, when the background reception<br />

of data on the specified communication channel is interrupted.<br />

Syntax ON ↔ COMSETGOSUB|<br />

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

0 = "console:"<br />

1 = "uart1:"<br />

2 = "uart2:"<br />

3 = "uart3:"<br />

4 = "centronics:"<br />

6 = "usb1:"<br />

7 = "uart4:"<br />

8 = "uart5:"<br />

/ is number or label of the program line to be branched to.<br />

Remarks This statement is closely related to COMSET, COMSTAT, COMSET<br />

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

is used to branch to a subroutine when one of the following conditions<br />

occur:<br />

- End character is received.<br />

- Attention string received.<br />

- Max. number of characters received.<br />

These three parameters are set for the specified communication channel by<br />

a COMSET statement.<br />

Examples In this example, the program branches to a subroutine for reading the<br />

buffer of the communication channel:<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> 17

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

Saved successfully!

Ooh no, something went wrong!