beautypg.com

Avery Dennison PCL User Manual

Page 13

background image

PAXAR PCL

Users Guide •••• 11

the data field might be ~DBLUE. The printer would then print BLUE at the position
defined by the field definition in the format, using the attributes specified in that field
definition.

The data fields must be sent to the printer in the same order that they are described in
the format. Box / underline fields which don't have any data associated with them are
automatically skipped so an ~D command should not be sent for a box / underline field.

Graphic data fields are preceded by a ~I followed by the image data in either BMP or
PCX format.

Once the last field data has been sent it should be followed by the ~ZZ command. This
command means that the batch information is complete and the printer can print the
batch. The ZZ command also includes the quantity. If ten tags were to be printed using
the data which preceded the ZZ command, the command would be ~ZZ0010~. The
~ZZ command must ALWAYS be followed by a ~. The final ~ character signals the
end of the quantity string. The printer will not start printing a batch until it receives the
final ~ character.

An example of a batch of data would be:

~ZD00~DBLUE~D012345678905~D01~D23,32,33,42~ZZ0010~

The ~D command has some built in safety features. If a format describes a field as
having seven characters and then that field receives data from an ~D field which
contains nine characters the last two characters of the data in the ~D command will be
dropped. If a field is described as being seven characters long and the ~D command
only sends six characters the field will be padded out with spaces to seven characters
before it is printed. Also if there are more ~D data fields sent in a batch then there are
fields described in the format, the extra data fields at the end of the batch data will be
dropped.

The ~D command has a few useful variations. If an ~D command is followed
immediately by another ~D or ~ZZ so that no data follows the ~D command, then the
data from the previous batch will be used for that field. If the ~D command is followed
by one space character and then followed by another ~D or ~ZZ, then that field will be
blank for the current batch.

Carriage Returns may be used freely throughout the format and batch data to enhance
readability. However, it is good practice to only use carriage returns between
commands and data fields. In most cases, carriage returns are ignored within data fields.
However, the carriage return is a valid character in some field types such as the
Datamatrix bar code.