Physical Ports (Serial, Parallel, USB, Bluetooth®)

Physical Ports (Serial, Parallel, USB, Bluetooth
®
)

Though the types of devices interacting with the printer's ports may vary greatly, internal to the printer, the ports are all handled in the same way. These ports are opened with the ZBI
OPEN
command and closed with the ZBI
CLOSE
command. When one of these ports is opened, it is disconnected from the ZPL parser and any data in the buffer will be redirected to the ZBI environment.

Example

In the following example,
"SER"
could be replaced by
"PAR"
,
"USB"
, or
"BLU"
depending on the application.
10 CLOSE ALL 20 LET INPORT = 1 25 SLEEP 1 30 OPEN #INPORT: NAME "SER" 35 ON ERROR GOTO 25 40 PRINT #INPORT: "Enter your name:"; 50 INPUT #INPORT: YOURNAME$ 55 ON ERROR GOTO 70 60 PRINT #INPORT: "You entered: "; YOURNAME$ 70 CLOSE #INPORT