ZPL Parser

ZPL Parser

To make a ZBI program print, it is necessary to create a connection from the program to the ZPL parser on the printer. The connection will function in the same way as a connection to a physical port, except that the connection will not automatically terminate. The ZPL parser in the printer can handle many incoming connections simultaneously. For example, a ZBI program could take control of the serial port and send label formats to the ZPL parser, while the parallel port (unopened by ZBI) could also be used to send label formats directly into the parser.
The ZPL parser will lock onto one port once a format is started (via the
^XA
command). So, in some cases, is it desirable to start and stop your communications to ZPL in one continuous sequence.
Another use of ZBI is to check printer status, while another application prints to another port.
Example
Here is how that can be done:
10 OPEN #1: NAME "ZPL" 20 PRINT #1: "~HS" 30 FOR I = 1 TO 3 40 INPUT #1: A$ 50 PRINT A$ 60 NEXT I