Intermec PX4i Fingerprint Developer's Guide (old) - Page 71
Managing Input and Output, Intermec Fingerprint Developer's Guide
View all Intermec PX4i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 71 highlights
Chapter 4 - Managing Input and Output • the character or string of characters used to tell the printer to start receiving data and to stop receiving data. • the character or characters to be ignored (filtered out from the received data). • the character or string of characters to use as an attention string that interrupts reception. Note: Start, stop, ignore, and attention characters are selected according to the protocol of the computing device that transmits the data. Non-printable characters, for example STX and ETX can be specified using a CHR$ function. To specify no character, use an empty string. • the number of characters received before the transmission is interrupted. This parameter also decides the size of the buffer (that is, how much of the temporary memory will be allocated). In this example, the background reception is set to channel "uart1:", the Start character is A, the End character is CHR$ (90) (the character Z), the character to be ignored is #, the attention string is BREAK, and the maximum number of characters in the buffer is 20: 60 COMSET 1,"A",CHR$(90),"#","BREAK",20 3 Use an ON COMSET GOSUB statement to specify a subroutine to branch to when reception is interrupted. Interruption occurs when any of the following conditions are fulfilled: • an end character is received. • an attention string is received. • the maximum number of characters have been received. In this example, when the reception of data on communication channel 1 ("uart1:") is interrupted, the execution branches to a subroutine starting on line number 1000. 70 ON COMSET 1 GOSUB 1000 4 Turn on the COMSET: 80 COMSET 1 ON Note: The COMSET interrupt has to be turned on after it has occurred and been taken care of. 5 When reception is interrupted, check the buffer contents. You can read the content of the buffer (for example, to a string variable) using a COMBUF$ function: 1000 QDATA$=COMBUF$(1) The COMSTAT function can be used to detect what has caused the interruption. Use the logical operator AND to detect the following four reasons of interruption as specified by COMSET: • Max. number of characters received (2). • End character received (4). Intermec Fingerprint Developer's Guide 55