Intermec PM43/PM43c Fingerprint Developer's Guide (PC23d, PC43d/t, PM23c, PM43 - Page 62
Controlling Communication, Using BUSY or READY Statements
View all Intermec PM43/PM43c manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 62 highlights
Chapter 4 - Managing Input and Output In case of INPUT# and LINE INPUT#, the input is not accepted until a carriage return is issued. This example demonstrates how the printable character and decimal ASCII value of various keys on the printer keyboard can be printed to the screen of the host. 10 PRINT "Character", "ASCII value" 20 OPEN "console:" FOR INPUT AS 1 30 A$=INPUT$(1,1) 40 B%=ASC(A$) 50 PRINT A$, B% 60 GOTO 30 70 CLOSE 1 RUN Controlling Communication The following Fingerprint commands are used to control the communication between the printer and the host (or other connected devices): • BUSY • READY • ON | OFF LINE • VERBON | VERBOFF • SYSVAR(18) Using BUSY or READY Statements Using these two statements, you can let the program execution turn a selected communication channel on or off. There is a difference between serial and parallel communication: • For serial communication, the type of busy/ready signal is decided in the Setup Mode (Ser-Com; Flowcontrol): • When a BUSY statement is executed, the printer sends a busy signal (for example, XOFF or RTS/CTS low). • When a READY statement is executed, the printer sends a ready signal (for example XON or RTS/CTS high). For more information, see the printer user's guide. • The parallel Centronics communication channel uses the BUSY/READY statements to control the PE (paper end) signal on pin 12: • BUSY = PE high • READY = PE low The status of the PE signal can be read by a PRSTAT statement, as in this example: IF (PRSTAT AND 4) GOTO.....ELSE GOTO..... Note: Issuing a READY statement is no guarantee that the printer will receive data. There may be other conditions that prevent the printer from receiving data, such as a full receive buffer. 50 Fingerprint Developer's Guide