~JX (Cancel Current Partially Input Format) __________________________________________________ 45
3.2.4 Control commands__________________________________________________________________ 45
~PH o ^PH (Slew to Home Position) ________________________________________________________ 45
~PP o ^PP (Programmable Pause) __________________________________________________________ 45
~PS (Print Start) ________________________________________________________________________ 45
3.2.5 Prefix replacement commands_________________________________________________________ 46
~CCx o ^CCx (Change Caret)______________________________________________________________ 46
~CTx o ^CTx (Change Tilde)______________________________________________________________ 46
7. List of figures _____________________________________________________________ 61
8. List of tables ______________________________________________________________ 62
CZL – Programmer Manual
NTRODUCTION
2. I
In order to operate, thermal printers need to receive a series of commands sent to them in order
according to precise procedures.
To address all needs, we have developed the CZL language for its own printers, among others.
In general, a CZL command consists of a prefix, a two-character mnemonic code, and a string of
parameters. The prefix, the mnemonic code, and the string of parameters are composed of printable
characters without any control character (e.g. escape): this guarantees easy loading of the software
onto different types of computers.
For the same reason, the print file to be sent to the printer may be a simple text file (composed with
any editor); alternatively, the instructions may be sent in the form of a programming language (e.g.
Basic), or the label may be laid out on the monitor screen with WYSIWIG1 or word processing
software that, by means of a driver, converts the label into instructions that can be understood by the
printer. In this later case, the user can ignore the programming language described by this manual,
even if knowing it is useful to a full understanding of the functions and potential of the machine.
This software is extremely powerful and makes it possible for non-expert users to create labels by
using just the mouse and the keyboard, while also making it possible to use our printers with any
application (database, word processing, and others). On the other hand, if the user wishes to
optimize machine performance, the best approach is to program the printer with the CZL language
described in this manual.
1
What You See Is What You Get.
6
CZL – Programmer Manual
7
3. C
OMMANDS
In the CZL language, all commands can be sent both in upper and lower case characters (or partially
in upper case and partially in lower case), which produce the same result and are always preceded
by a prefix that identifies their type. The character ^ (
^ commands
and the character ~ (
126
10
or
on the ASCII table) the
7E
16
94
10
or
on the ASCII table) identifies the
5E
16
~ commands
(see fig. 1).
Some commands support both the prefix ^ and ~2.
CZL com m ands
^
commands
G e n era l p ara meters for th e lab e l
Field definition
Text form atting
Printer configuration
Font
Calibration and setting comm ands
Prefix replacemen t com man ds
fig. 1 – Classification of commands
2
Both prefixes can be replaced with the commands
described on page 46.
Barcode
Graphic object
Ad vanced comman d s
~
commands
Query commands
Cancel commands
Control commands
Diagnostic com m and s
^CC
or
(Change Caret) and
~CC
^CT
or
(Change Tilde),
~CT
CZL – Programmer Manual
The parameters are separated from each other and their respective commands by a separator
character, the comma (
Please refer to section 5 on page 50, where several examples illustrate the functions of the
commands.
44
10
or
on the ASCII table).
2C
16
3.1 ^ Commands
3.1.1 General parameters for the label
3.1.1.1 Start and end format commands
^XA (Start Format)
When it receives this command, the printer prepares to receive the ^ commands that will be
performed in the order in which they have been received. In other words, all ^ commands are
preceded by the command
and followed by the subsequent command
^XA
^XZ
.
^XZ (End Format)
This is normally the last in a series of commands sent to the printer. It follows all ^ commands,
which can thus be inserted between the command
only interprets ~ commands or another
command.
^XA
^XA
and
. After this command, the printer
^XZ
3.1.1.2 Positioning commands
^LHx,y (Label Home)
This command makes it possible to position the origin of the coordinates, or move the entire bitmap
away from zero (the upper left corner) (see fig. 2).
8
9
fig. 2 – Origin of the coordinates
CZL – Programmer Manual
x
is a whole number from
y is a whole number from
3
0
to
6
0
to
After receiving this command (which must be sent before the first command
page 13) the printer keeps these values until it is reset or until it receives another
4
9999
and expresses the horizontal offset expressed in dots5.
7
9999
and expresses the vertical offset expressed in dots.
^FS
as described on
^LH
command.
The command only affects the commands that follow it, so it is normally one of the first to be sent,
in order for it to affect the entire label.
It is useful, for example, in centering text on a pre-printed label.
^LLy (Label Length)
In thermal printers the paper is positioned under the head by means of a reference (the gap between
labels, the hole, or the black tick mark on the back). If the paper does not contain any reference
marker (meaning that it is a
procedure (with the
^MN
length command).
The command must be sent before the first
comes before or after the
another
3
Default value.
4
Although it is possibl e to insert any whole number up to 9999, the limit is determined by the number of dots on the
print head (or its width for the set resolution). A greater number displaces the image outside the useful printing area.
See the printer User Manual.
5
If the printer resolution (see the User Manual) is 203 dpi, one dot corresponds to 1/8 mm, if the resolution is 300 dpi,
to 1/12 mm.
6
Default value.
7
Although it is possibl e to i nsert a ny whole number up to 9999, the limit is determined by the maximum printing length
(in turn limited by the available amount of RAM). A larger number displaces the image outside the useful printing area.
See the printer User Manual.
^LL
command.
^MN
continuous form
) the printer must be informed of the operating
command on page 15) and length of the printing page (using the label
^FS
command (page 13) (it does not matter whether it
command) and remains in effect until the machine is reset or receives
CZL – Programmer Manual
is a whole number from
y
10
.
dots
08
to
9
and expresses the length of the printing page in
9999
numbers of
^LSx (Label Shift)
In reference to fig. 2 on page 9, this command shifts the entire image of the label to the left by x
dots.
is a whole number from
x
12
.
dots
This command too must be sent before the first
the machine is reset or receives the next
011
to
and expresses the amount of displacement in
9999
command (page 13) and remains in effect until
^FS
command.
^LS
numbers of
In practice, the amount (in dots) the label is moved from the origin of the coordinates, illustrated in
fig. 2 on page 9, is determined by the following formula:
^LHx + ^FOx - ^LSx13
If the result of this formula is a negative value, it is interpreted as equal to 0 because it is not
possible to print farther to the left than the first useful dot on the print head.
3.1.1.3 Rotation commands
^FWa (Field Orientation)
This permits clockwise rotation by 0°, 90°, 180°, or 270° (according to the value assigned to
parameter a) of all (and only) those fields which can be assigned a rotation parameter. In other
words, the rotation defined by this command is the default setting if another one is not specified.
The parameter a may assume the following values:
(270°) orientation
The command affects only those fields which can be assigned a rotation parameter when it is
omitted. When the rotation parameter can be assigned and is used, it overrides the
Like the others, the
or the next
8
Default value.
9
See note 7 on page 9.
10
See note 5 on page 9.
11
Default value.
12
See note 5 on page 9.
13
See pages 8 and 11 respectively for a description of the commands
14
Default value.
command is sent.
^FW
command affects only the commands that follow it until the printer is reset
^FW
^LH
and
^FO
.
command.
^FW
10
CZL – Programmer Manual
11
3.1.2 Field definition
These commands make it possible to define the type and position of the fields (e.g. alphanumeric
strings) that comprise the label.
^FOx,y (Field Origin)
This command determines the position of the upper left corner of the field in relation to the zero
coordinate set by the command
whatever the rotation, the upper left corner of the rectangle surrounding the field is set to the
coordinate x, y (see fig. 3). When the field is horizontal (whether its rotation is
it is always in the same position as when it is vertical (whether its rotation is
(page 8) and is independent of the rotation. In other words,
^LH
normal
rotated
or
or
bottom up
inverted
),
).
fig. 3 – Rotation of a field positioned with the ^FO command
15
is a whole number from
x
to
0
page 9) in the upper left corner of the field, expressed in dots
is a whole number from
y
18
to
0
9999
9999
16
and is the horizontal position along the x axis (see fig. 2 on
19
and is the vertical position along the y axis in the upper left
17
.
corner of the field, expressed in dots.
^FTx,y (Field Typeset)
This command, like the previous one, sets the position of the origin of the field (in relation to the
zero coordinate set by the
15
Default value.
16
See note 4 on page 9.
17
See note 5 on page 9.
18
Default value.
19
See note 7 on page 9.
command described on page 8) consistently with the content of the
^LH
CZL – Programmer Manual
field and does not change the rotation. In practice, the field rotates around its origin (generally the
lower left corner), as appears in fig. 4.
fig. 4 – Rotation of a field positioned with the ^FT command
x is a whole number from 020 to 999921 and is the horizontal position along the x axis (see fig. 2 on
page 9), expressed in dots22.
y is a whole number from 023 to 999924 and is the vertical position along the y axis, expressed in
dots.
The origin of the field, whose coordinates are set by the parameters x and y, varies according to its
type.
In text fields, the origin i s located at the intersect ion of the line on which the characters are al igned
and the vertical line with which the first character is aligned (in the case of horizontal writing, this is
the lower left corner).
If the coordinates are omitted (even just one of these), the coordinates of the last field entered are
used as if the label image were virtually shifted with a cursor. This is how the fields can be more
easily positioned with respect to one of them: by changing the coordinates of the reference field, all
the other fields are moved while preserving their relative position with respect to the first field.
In th e bar-code fields, the origin is the base of the bar-code, even when there i s a human-readable
field beneath them or when the bar-code provides for a line above and below it.
The origin of the graphic box fields is the lower left corner.
The origin of the images is the lower left corner of the rectangle in which the graphic image is
inserted.
20
Default value.
21
See note 4 on page 9.
22
See note 5 on page 9.
23
Default value.
24
See note 7 on page 9.
12
CZL – Programmer Manual
13
^FDaa…a (Field Data)
This command makes it possible to define the string to be entered in the field.
is an alphanumeric string (up to 3072 characters long) of any printable character, with the
aa…a
exception of the two prefix characters (e.g. ^ and ~). The characters ^ and ~ can be printed if the
prefix character is changed with the commands
on page 13.
^FH
This last command,
is useful for printing all characters after the 127th on the ASCII table (table
^FH,
^CC (~CC
) and
^CT (~CT
) or with the command
9 and table 10 on pages 59 and 60) and, in general, all characters that are not directly available on
the keyboard.
Even the characters
<CR> (13
10
,
0D
) and
16
<LF> (10
10
,
) can be entered in the field.
0A
16
^FS (Field Separator)
This command is the separator for each field; in other words, it sets the end of a field and the
beginning of the next one. Therefore, it is obligatory, and every command for rotation, positioning,
etc. in the field takes effect if it is followed by the
command.
^FS
^FHi (Field Hex)
This command makes it possible to print any character through its hexadecimal code. In particular,
it is possible to insert the hexadecimal code of the character to be printed directly in the string
of the
Therefore, the
command as long as it is preceded by the character i defined by the Field Hex command.
^FD
command must precede every
^FH
command (or any other command where a
^FD
aa…a
data field is specified).
can be any printable character as long as its meaning is unambiguous: in the following
i
aa…a
string, every appearance of the i character signifies “hexadecimal code identifier.” Therefore, it
makes sense to use a character that is not printed: The default i s the
).
5F
16
underline
character _ (
95
10
,
After the i identifier, the machine interprets the t wo subsequent charact ers as the “hex adecimal code
of the character to be printed,” and thus the two following characters can be any two of the
following:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, A, a, B, b, C, c, D, d, E, e, F, f.
3.1.3 Text formatting
^FBl,n,s,g,m (Field Block)
This command makes it possible to print different lines of text enclosed in a virtual box that
assumes the properties (origin, font, rotation) of the text field. This makes it possible to move,
enlarge, and otherwise manipulate the entire box without modifying each string of text. This
CZL – Programmer Manual
command incorporates an automatic word wrapping function25 to make operations easier without
worrying about the placement of individual strings.
is the width of the box expressed in dots26. It can be any whole number between
l
027
and
9999
However, it must not be smaller than the width of a character or larger than the width of the
printing area (see note 4 on page 9). If the width of the block is not sufficient to contain at least
one character, nothing is printed; if it is not large enough to contain everything, only the text
contained in the block is printed28.
is the maximum number of lines that the box can contain. It can be any whole number between
n
and
9999
number of lines
. In practice, this parameter determines the height of the box (which is thus expressed in
). Thus, by changing the font type, the dimensions of the box are automatically
129
adjusted. If the number of lines is not sufficient to contain all the lines of text that are to be
printed, the last of these is overwritten (thus becoming illegible) until all characters to be printed
are consumed.
30
è is a whole number between
s
–9999
and
+9999
and indicates the space (in dots31) to add (if the
number is positive) or subtract (if the number is negative) between one line and another. The
numbers without sign are read as positive.
is a letter that can assume the following value on the basis of the type of justification desired:
g
32
L
for left justification of the text, C to center it in the box, J for full justification, and R for right
justification.
is a whole number between
m
0
33
and
indicating the number of dots that the left margin is
9999
indented for lines after the first. Its function is thus to indent text.
To render formatting of text inside the box easier, the following sequences of special characters can
be used:
corresponds to a
\&
corresponds to a word break. If the split word is close to the left margin, the printer adds word-
\
<CR>
(Carriage Return) +
<LF>
(Line Feed), to force a carriage return.
break hyphen. Otherwise, the word break is ignored.
serves to print the character \.
\\
If a word is too long to be contained on a single line (and is not broken by any \ character) a wordbreak hyphen is automatically added close to the left margin of the block and the rest of the word is
printed on the following line. The language does not provide any rule for syllabification of the
words: they are split apart according to their length. Therefore, it is necessary to force their break
with the \ command to respect the syllabification rules of the word itself.
These “special” sequences of characters also fall within the limit of 3072 characters indicated for
the
34
command. That is, each alphanumeric string
^FD
, including special sequences, cannot
aa…a
be longer than 3072 characters.
25
Just as in word processing, the text is justified (on the left, center, full justification, or on the right) and returns
automatically inside the box.
26
See note 5 on page 9.
27
Default value.
28
Therefore, the parameter l is mandatory since the default value 0 would be used instead.
29
Default value.
30
0 is the default value.
31
See note 5 on page 9.
32
Default value.
33
Default value.
.
14
CZL – Programmer Manual
15
The “normal” characters (i.e. different from the \& sequence mentioned above)
and
<LF> (10
When the
Therefore, especially when also using the
,
) are ignored, just like the spaces (
0A
10
16
command is used, the field origin is the lower left corner (see fig. 4 on page 12).
^FT
command, it is necessary to check whether, upon
^FB
32
10
,
) at the end of the line.
20
16
<CR> (13
10
,
0D
16
)
enlargement of the font size, there could be a change in the dimensions of the box (from bottom to
top) that could spill over the top limit for the label. In this case, only the part of the label contained
within the printing area is printed, and the excess amount is left out. In fig. 2 on page 9, the origin of
the coordinates corresponds to the upper left corner of the label, and thus everything that goes
beyond the origin (with, absurdly, negative coordinates) is lost.
When the
command is used, upon an increase in font size, the box resizes itself from top to
^FO
bottom (the origin of the coordinates is the upper left corner, as appears in fig. 3 on page 11) and,
therefore, the risk consists in losing the portion extending below the lower edge of the label.
More generally, with the CZL emulation, the useful bitmap is determined by the size of the label:
never does it happen that one part of the image is printed on one label and the other part on another.
For the
command.
^FS
command to take effect, it m ust be preceded by the data string and be followed by the
^FB
3.1.4 Printer configuration
Many of the printer configuration parameters (please refer to the User Manual) can also be defined
with software. The parameters defined with software override those defined through the machine
configuration menu. Or, if one of the configuration parameters is modified with a software
command, the current configuration of the machine is modified until it is reset. When the machine
is turned on again, the configuration parameters assume the values of the last saved configuration,
and those changed with software are lost if they have not been saved.
^MNa (Media Tracking)
Through this command, it is possible to inform the printer of the type of label in use: continuous
form (no reference marker) or labels with a reference marker (be it a gap, black tick mark, or hole).
In the two cases where the parameter a assumes the following values:
for continuous form
N
for the reference label.
Y
With the continuous form, it is necessary to define the page length with the
described above (page 9); where the label is separated by a reference marker (of any type), the
length of the printing page is determined by the paper sensor set up to detect the gap (or black tick
mark or hole).
The instruction is ignored if the parameter is ignored or different from these two.
command already
^LL
34
See page 13.
CZL – Programmer Manual
^MTa (Thermal Media)
In general, thermal printers can print on different types of media using ink ribbon (this type of
printing is called
thermal transfer
) or directly onto thermal paper (this is called
direct thermal
printing).
The printing mode is defined with a specific machine configuration parameter or with the following
command.
In this case, a can assume two different values:
to set the
T
to set the
D
thermal transfer
direct thermal
mode
mode.
The instruction is ignored if the parameter is omitted or is different from these two.
^MDn (Media Darkness)
Depending on the type of medium that is going to be used, the type of ribbon used, and the printing
speed, the print quality is determined by the head temperature. There are 30 possible temperature
levels (one of which is set from the panel). By means of this command, it is possible to adjust the
head temperature (and thus print density) incrementally according to the value set during
configuration. Specifically, the parameter n is a whole number between
–30
and
convention of assuming all numbers without sign as being positive. After executing the current
command, the number n is added algebraically to the temperature set during configuration; the
result of the operation is the new printer temperature. Even when several
commands are sent,
^MD
each one of them refers to the value set in the machine configuration. The effect of the commands is
not cumulative: it is the one resulting from the last command sent.
If the result of the command
temperature is assumed to be
30
produces a temperature value over
^MD
and 0 respectively.
or less than
30
+30
35
with the
0,
the
^LTn (Label Top)
In order to define the exact position of the label, this command can be used, where n is a whole
number between
–64
and
. The result is longitudinal displacement of the entire prin ting image
+64
by n dots36 in reference to the origin of the coordinates as indicated in fig. 2 on page 9. Once again,
it is assumed that numbers without sign are positive.
^JZa (Reprint After Error)
In general, after resetting following an operating error (e.g. when the paper or ribbon run out), the
printer reprints the whole label that was interrupted due to the error.
This command is used to disable this function.
The parameter a can assume one of the following two values:
reprinting is enabled
Y37
printing is disabled.
N
35
The default value is 0.
36
See note 5 on page 9.
37
Default value.
16
CZL – Programmer Manual
17
The instruction is ignored if the parameter is ignored or different from the two allowed, and it only
affects subsequent labels.
3.1.5 Font
The language offers a selection of fonts that can be chosen as necessary (see section 4.1 on page 47
for their specifications). It is possible to set a default font: in this case, all alphanumeric fields will
be in the font selected if not otherwise specified. Or, it i s possible to set the type of font for each
field.
The following commands permit you to determine the type of font and some of their features.
^CFt,a,l (Change Default Font)
This command makes it possible to chose the machine default font. After this command, all fields
are printed with the selected font (as well as their height and width) until the next
command.
is a letter between
t
38
and H or zero (
A
∅
) and identifies the font type (see section 4.1 on page 47).
a is a whole number between 0 and 999939 and indicates the height of the character expressed in
dots.
l is a whole number between 0 and 999940 and indicates the width of the character expressed in dots.
If one of the two height (a) or width (l) parameters is omitted, the other is forced proportionately.
Thus, if a width double the normal dimension for that font type is specified without indicating the
height, the latter is also assumed to be doubled in order to preserve the proportion of the character.
If both parameters a and l are omitted, the default values or those of the last ^CF command received
are applied.
The fact is that the language does not allow all possible heights for non-scalable fonts (those from A
to H). Approximations of multiples of the whole numbers closest to standard sizes are used for the
dimensions set with parameters a and l. Referring to table 5 on page 47, if the selected height of font
A is 16, the language forces the height to 18, which corresponds to double the standard height (9 x
2).
^CF
or
^Ax
^Axr,a,l (Alphanumeric Font)
This command lets you select the font field by field.
x is a letter between A and H and identifies the font type (see section 4.1 on page 47).
r is one of the following four letters and indicates the clockwise rotation of the field:
N normal rotation of 0°41
R rotated by 90°
I inverted by 180°
38
Default value.
39
The default value is specified, font by font, in table 5 on page 47.
40
See note 39.
41
The default value is N or generally the last value received with the ^FW command described on page 10.
CZL – Programmer Manual
B bottom up
is a whole number between 0 and
a
is a whole number between 0 and
l
Once again, the same observations made regarding the height and width specified by the
rotation of 270°
9999
9999
42
indicating the height of the character, expressed in dots.
43
indicating the width of the character, expressed in dots.
^CF
command on page 17 apply, to which the reader is referred.
^A∅r,a,l (Scalable font)
Scalable fonts merit a separate discussion.
They can be of any width or height, and their proportion is guaranteed by the algorithm resident in
the programming language. Otherwise, the dimensions of the bitmap fonts (those identified by
letters
A – H
sizes (even if the number is high).
Furthermore, the scalable fonts are proportionately spaced44, which enhances their appearance.
Like the bitmap fonts, the parameter r is one of the following four letters and indicates the
clockwise rotation of the field:
N normal
R rotated
I inverted
B bottom up
is a whole number between
a
is a whole number between
l
) are multiples of the standard. This means that there is a limited number of possible
rotation of 0°45
by 90°
rotated by 180°
rotation of 270°
10
10
and
and
1500
1500
46
, indicating the character height in dots.
47
, indicating the width of the character in dots.
3.1.6 Bar-code
3.1.6.1 ^Bx (Bar-code)
In order to insert a bar-code, its type and characteristics (e.g. rotation, height, etc.) must be
specified, where some these are typical (see section 4.2 on page 48 for a summary of these
characteristics). Since not all of these paramet ers are mandatory, with others being characteristic of
each bar-code, all the
one. As is true for all the other CZL commands, when a parameter is expressly omitted because the
default value or the previously set value are accepted, the
used so that the reader can know which one of the parameters has been “implied.” The separator
may be omitted when it is not followed by another parameter.
42
See note 39.
43
See note 39.
44
See note 202 on page 48.
45
The default value is N or generally the last value received with the
46
The default value is 15 or the value set with the last
47
The default value is 12 or the value set with the last
commands are explai ned in detail with the specific parameters for each
^Bx
separator must nonetheless be
command (page 17).
^CF
command (page 17).
^CF
comma
command described on page 10.
^FW
18
CZL – Programmer Manual
19
^BYm,r,a (Bar-code default values)
This command makes it possible to set the width of the module, the ratio and height of all bar-codes
included in the label, and affects the bar-codes that follow it up to the next
is a whole number between 1 and
m
48
and expresses the width in dots of the narrow bar (the base
10
module of the bar-code)
is a rational number (with a single decimal-place character) between
r
2.0
of the bar-codes. The actual ratio (according to which the bar-code is printed) is limited by the
fact that it is not possible to break up a dot into fractions. Therefore, it depends on the parameter
together with the parameter m in accordance with table 1. In fixed ratio bar-codes, this
r,
parameter has no effect.
is a whole number between 1 and
a
50
9999
and indicates the height of the bar-code, expressed in
table 1 – Relationship between the ratio and width of the module
^B2r,a,h,p,c (Interleaved 2/5)
This is a high-density code, accepts only numerals, and is of variable length with an optional digit
check; it accepts ratios from 2 to 3 (see table 8 on page 49).
The command accepts up to 100 characters but the limit is determined by the label width (or by the
maximum length of the printing area if the bar-code is rotated by 90°/270°51) together with the ratio
set by the
printing area due its excessive siz e (determined by the number of characters to be coded and/or by
the ratio), it could be wrongly interpreted by the reader. In any event, the part that is included in the
useful printing area is printed.
48
The default value is 2.
49
The default value is
50
The default value is 10. The upper limit is determined by the greatest length of the label (see note 7 on page 9).
51
The maximum length of the printing area is in turn limited by the available RAM. Please refer to the User Manual.
command on page 19. In other words, if the bar-code spills over the boundaries of the
^BY
. The point is used as the decimal separator.
3.0
Loading...
+ 43 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.