Intermec PX4i Fingerprint Developer's Guide (old) - Page 73
Setting Up RS-422 Communication, To set up the printer for RS-422 communication
View all Intermec PX4i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 73 highlights
Chapter 4 - Managing Input and Output If the channel is OPENed for INPUT: • LOC returns the remaining number of characters to be read from the receive buffer. • LOF returns the remaining free space (in bytes) in the receive buffer. If the channel is OPENed for OUTPUT: • LOC returns the remaining free space (bytes) in the transmitter buffer. • LOF returns the remaining number of characters to be transmitted from the transmitter buffer. The number of bytes includes characters that will be mapped as NUL. This example reads the number of bytes which remains to be received from the receiver buffer of "uart2:": 10 OPEN "uart2:" FOR INPUT AS #2 20 A%=LOC(2) 30 PRINT A% ... ... The example shows how the number of free bytes in the receive buffer of communication channel "uart2:" is calculated: 10 20 30 ... ... 80 90 100 1000 1010 1020 1030 1040 1050 1060 RUN OPEN "uart2:" FOR INPUT AS #2 A%=LOF(2) PRINT A% COMSET 1 ON IF QDATA$="" THEN GOTO 90 END QDATA$=COMBUF$(1) IF COMSTAT(1) AND 2 THEN PRINT A$ IF COMSTAT(1) AND 4 THEN PRINT B$ IF COMSTAT(1) AND 8 THEN PRINT C$ IF COMSTAT(1) AND 32 THEN PRINT D$ PRINT QDATA$ RETURN Setting Up RS-422 Communication Some Intermec printers can be fitted with an optional interface board that provides RS-422 connectivity (isolated or non-isolated) on "uart2:" or "uart3:". Neither of these 4-line protocols provide the hardware handshake (RTS/CTS) feature, but XON/XOFF or ENQ/ACK can be used if so desired. Two lines transmit data and the other two receive data. After you install the interface board in the printer, use the next procedure to set up RS-422 communication. To set up the printer for RS-422 communication 1 Set the printer flow control as follows: RTS/CTS: ENQ/ACK: Always Disable Enable or Disable Intermec Fingerprint Developer's Guide 57