ZPL FAQ
Описание команд на официальном сайте Zebra:
ZPL.
Для наглядности команды я буду выделять жирным шрифтом, параметры постараюсь сделать цветными.
Введенный текст и передаваемые переменные оставлю обычными.
^XA
^LH30,
100
^FO20,
10^AD^FDWWW.AskQA.RU^FS
^FO20,
60^B3^FDWWW.URN.SU^FS
^XZ
^XA - Начало этикетки
^LH30,
100 - Задаёт начальную позицию 30 точек вправо и 100
точек вниз
^FO20,
10 - Field Origin, отступает ещё на 20 точек вправо и 10 вниз от точки,
которую мы определили предыдущей командой.
^A - Определяет шрифт.
В нашем случае ^AD выбран шрифт
D. По умолчанию стоит A. Шрифты, которые
соответсвуют этим буквам хранятся в EPROM принтера. ZPL II разрешает использовать буквы
A - Z и цифры 1 - 9.
^FD - Field Data, объявляет начало поля с данными
WWW.AskQA.RU - обычные данные которые я ввёл. Они будут просто напечатаны на теге.
^FS - Field Separator
^FO20,
60 - Отступаем по-прежнему 20 точек вправо, но теперь, чтобы
надписи не наложились друг на друга - 60 точек вниз.
^B3 - Этой командой мы показываем, что хотим распечатать баркод в формате
Code 39 (USD-3 Code, Code 3 of 9).
^FDWWW.URN.SU^FS - здесь всё как в предыдущем примере, но мы помним,
что теперь данные из поля будут не только распечатаны, но и изображены в виде баркода.
^XZ - Обозначает конец этикетки.
На каждый параметр можно кликнуть чтобы перейти к подробному описанию. Любо просто пролистать вниз.
^XA
^PW366
^CI28
^RW24,24,A2
^FS
^RS8,B10,200,3,E
^FS
^RB96,8,3,3,24,20,38
^FS
^RFW,E
^FD48,0,5,6438092,0,#Serial#
^FS
^FN3^RFR,H
^FS
^HV3
^FT8,24^A0N,26,26^FD#ProductCode#
^FS
^FO8,36^A0N,26,26^FB300,10,,100^FD#ProductName#^FS
^FT8,105^A0N,26,26^FD#Quantity#^FS
^FT130,105^A0N,26,26^FD#UnitOfQuantity#^FS
^FT8,128^A0N,26,26^FDASK.QA^FS
^FT9,128^A0N,26,26^FDASK.QA^FS
^FT134,128^A0N,26,26^FD#Serial#^FS
^FT134,128^A0N,26,26^FD#Serial#^FS
^XZ
1) Параметры, помещённые между символами решётки # - это переменные, которые передаются с сервера. Для печати статичного изображения они не нужны, но на практике теги печатаются большими сериями и серийный номер меняется автоматически.
#Serial#
2)
🔝
Print Width
24 - Read Power
24 - Write Power
A2 - (a) - RFID antenna element selection. Note - This parameter
is valid only on the R110Xi4 printer. This parameter selects an antenna element from the
printer's antenna array.
Accepted values: A1, A2, A3, A4, B1, B2, B3, B4, C1, C2, C3, C4, D2, D3, D4, E2,
E3, E4, F2, F3, F4 (combinations D1, E1 and F1 are invalid)
A1 - это нижний (ближний если смотреть на принтер) левый угол. F4 - верхний (дальний) правый угол.
🔝
^RS - Set Up RFID Parameters
8 - (t) tag type тип тега. Gen 2 is the only tag type valid for
Zebra R110Xi4, RZ400, RZ600 and RP4T printers.
Пока непонятно какой тип соответствует 8, т.к. обычно это значение в диапазоне 1 - 5, но видел в примерах, что ^RS8 это Gen2
1 = EPC Class 0
2 = EPC Class 0 Plus
3 = EPC Class 1 64-bit
4 = EPC Class 1 96-bit
5 = ISO 18000-06B
Default value: 4
Because some countries restric the frequencies that can be used for RFID, not all
tag types listed may be supported by your RFID printer. If you specify a tag type
that is not supported, the printer will use the default value.
B10 - (p) Sets the read/write position
of the transponder in the
vertical (Y axis) in dot rows from the top of the label. Set to 0 (no movement)
if the transponder is already in the effective area without moving the media.
This parameter sets the read/write position of the transponder in one of two ways:
absolute mode or relative mode. For more information about these modes,
see Setting the Programming Position Manually on page 19 of RFID Programming Guide 2 Manual.
Important: If a label format specifies a value for the programming position, this value will
be used for the programming position for all labels untill a new position is specified or
until the transponder calibration procedure is run.
Accepted Values:
Absolute Mode:
xxxx = 0 to label lenght (in dot rows). Move the media to the specified position xxxx on
the label, measured in dot rows from the label top, before encoding. Set to 0 (no movement)
if the transponder is already in the effective area without moving the media.
Relative Mode Forward:
Fxxx = F0 to Fxxx (where xxx is the label length in millimeters or 999), whichever is less).
Move media forward, printing bitmap, for xxx millimeters before reading or encoding.
Relative Mode Backward:
Byy = B0 to B30 (in millimeters, 30 mm maximum). Move media backward for yy millimeters before
reading or encoding. (Does not apply to the RP4T printer.)
Note: When using a backward program position, allow enough media or liner to ensure that the printer
can back up the media wihout the leading edge disappearing under the printhead mechanism.
Default value:
F0 (which moves the leading edge of the label to the print line)
200 - (v) - length of void printout
3 - (n) - number of labels - The number of labels that will
be attempted in case of read/encode failure. Accepted values: 1 to 10. Default value: 3
E - (e) - error handling -
If an error persists after the specified number of labels are tried, perform this error handling
action. Accepted values: N = No action (printer drops the label format causing the
error and moves to the next queued label). P = Place printer in Pause mode
(label format stays in the queue until the user cancels). E = Place printer
in Error mode (label format stays in the queue until the user cancels). Default value: N
🔝
^RB - Define EPC Data Structure
96
- (n) total bit size of the field. Accepted values: 1 to n,
where n is the bit size of the tag. Default value: 96
8,3,3,24,20,38 (p1 ... p15) - partition sizes - Specify each
partition size. These must add up to the total bit size. Accepted values: 1 to 64 bit
total bit size. Default value: 1.
Таким образом мы показали, что 96 бита раделены на шесть полей содержащих 8, 3, 3, 24, 20, 38
SGTIN-96.
96 - длина EPC блока. 8 - Header. 3 - Filter. 3 - Partition. 24 - Company Prefix. 20 -
Indicator/Item Reference. 38 - Serial Number.
🔝
^RF - Read or Write RFID Format.
W - (o) - operation - The action to be performed. Accepted
values: W = write to the tag. L = write with LOCK (if supported by tag type).
R = read the tag. Default value: W.
E - (t) - type - Accepted values: A = ASCII, H = Hexadecimal,
E = EPC (ensure proper setup with the ^RB command). Default value: H.
🔝
Что означают параметры 48,0,5,6438092,0,#Serial# после ^FD с первого взгляда непонятно. В описании у ^FD всего один параметр
Default Value: none - a string of characters must be entered.
^FD у нас идёт не один, а в связке с ^RFW,
E и определённым перед ним ^RB96,
8,3,3,24,20,38
То есть нужно рассматривать всю комбинацию команд.
^RB96,
8,3,3,24,20,38
^RFW,
E^FD48,0,5,6438092,0,#Serial#
И при этом не забывать, что мы записываем теги в соответствии со стандартом
SGTIN-96
Общая длина | Header | Filter | Partition | Company Prefix | Indicator/Item Reference | Serial Number |
---|---|---|---|---|---|---|
96 | 8 | 3 | 3 | 24 | 20 | 38 |
48 | 0 | 5 | 6438092 | 0 | #Serial# |
🔝
^FN - Field Number
Description the ^FN command numbers the data fields. This command is
used in both ^DF (Store Format) and ^XF
(Recall Format) commands.
In a stored format, use the ^FN command where you would
normally use the ^FD (Field Data) command. In recalling
the stored fromat, use ^FN in conjunction with the
^FD command.
Format ^FN#
# = number to be assigned to the field.
Accepted Values: 0 to 9999
Default Value: 0
3 - Почему у нас стоит 3 пока не понятно
^RF - Read or Write RFID Format.
R - значит, что мы читаем тег.
This command allows you to read or write to an RFID tag.
Note: When using this command to read a tag, you may use a field variable to
print the tag data on the label or to return the data to the host.
Printers That Support This Command: RXi, R110PAX4
Format ^RFo,
t, b
o = operation - The action to be performed.
Accepted values: W = write to the tag, L = write with LOCK (if supported by tag type),
R = read the tag
Default value: W
t = type - Accepted values: A = ASCII, H = Hexadecimal,
E = EPC (ensure proper setup with the ^RB command)
Default value: H
b = starting block number - Accepted values:
0 to n, where n is the maximum number of blocks for the tag.
Default value: 0
🔝
^HV - Host Verification
Description - This command is used to return data from specified fields, along with an
optional ASCII header, to the host computer. The command can be used with any field that
has been assigned a number with the ^RT command or the ^FN and
^RF commands.
Format ^HV#,n,
h
# = field number specified with another command. The value
assigned to this parameter should be the same as the one used in another command.
Accepted values: 0 to 9999
Default value: 0
В предыдущей команде (^FN3) у нас было значение 3. Видимо, поэтому и здесь у нас 3 (^HV3). Но нужно прояснить.
n = number of bytes to be returned
Accepted values: 1 to 256
Default value: 64
h = header - Header (in uppercase ASCII characters) to be returned with
the data.
Acceptable values: 0 to 3072 characters
Default value: no header
🔝
^FT - Field Typeset
The ^FT command sets the field position, relative to the home position of
the label designated by the ^LH. The typesetting origin of the field is fixed
with respect to the contents of the field and does not change with rotation.
Note: The ^FT command is capable of concantination of fields.
Format: ^FTx,y,
z
Parameters | Details |
---|---|
x = x-axis location (in dots) | Values: 0 to 32000 Default: position after last formatted text field |
y = y-axis location (in dots) | Values: 0 to 32000 Default: position after last formatted text field |
z = justification The z parameter is only supported in firmware version V60.14.x, V50.14.x, or later | Values: 0 = left justification 1 = right justification 2 = auto justification (script dependent) Default: last accepted ^FW value or ^FW default The auto justification option may cause unexpected results if variable fields or bidirectional text are used with ^FT. For best results with bidirectional text and/or variable fields, use either the left or right justification options. |
^FT8,8
8 - отступ слева
24 - отступ сверху
Field Typeset
Description The ^FT command also sets the field position, relative to the home position of the label designated by the ^LH command.
The typesetting origin of the field is fixed with respect to the contents of the field and does not change with rotation.
Format ^FTx,y
Parameters | Details |
---|---|
x = x-axis location (in dots) | Accepted Values: 0 to 32000
Default Value: positiono after last formatted text field |
y = y-axis location (in dots) | Accepted Values: 0 to 32000 Default Value: position after last formatted text field |
Bar Codes The origin is at the base of the bar code, even when an interpretation is present below the bar code, or if the bar code has guard bars.
Graphic Boxes The origin is at the bottom-left corener of the box.
Images The origin is at the bottom-left corner of the rectangular image area.
Examples available here
When a coordinate is missing, the position following the last formatted field is assumed. This
remembering simplifies field positioning with respect to other fields. Once
the firest field is positioned, other fields follow automatically.
There are several instances where using the ^FT command without specifying x and y parameters is not
recommended:
^A0N,26,26^FD#ProductCode#
^A - Определяет шрифт.
В нашем случае ^A0 выбран шрифт 0 - parameter (f) - font name. По умолчанию стоит A. Шрифты, которые соответсвуют этим буквам хранятся в EPROM принтера.
ZPL II разрешает использовать буквы A - Z и цифры 1 - 9.
N - parameter o = font orientation. Accepted Values: N = normal, R = rotated 90 degrees (clockwise),
I = Inverted 180 degrees, B = read from bottom up, 270 degrees
Default Value: the last accepted ^FW value or the ^FW default
26,26 - это высота (h) и ширина (w),
заданные в точках.
Examples available here
^FS
^FO8,36^A0N,26,26^FB300,10,,100^FD#ProductName#^FS
^FT8,105^A0N,26,26^FD#Quantity#^FS
^FT130,105^A0N,26,26^FD#UnitOfQuantity#^FS
^FT8,128^A0N,26,26^FDASK.QA^FS
^FT9,128^A0N,26,26^FDASK.QA^FS
^FT134,128^A0N,26,26^FD#Serial#^FS
^FT134,128^A0N,26,26^FD#Serial#^FS
^XZ
ZPL симулятор для просмотра layout файлов
Рекомендую наш хостинг beget.ru |
Пишите на info@eth1.ru если Вы: |
1. Хотите написать статью для нашего сайта или перевести статью на свой родной язык. |
2. Хотите разместить на сайте рекламу, подходящуюю по тематике. |
3. Реклама на моём сайте имеет максимальный уровень цензуры. Если Вы увидели рекламный блок недопустимый для просмотра детьми школьного возраста, вызывающий шок или вводящий в заблуждение - пожалуйста свяжитесь с нами по электронной почте |
4. Нашли на сайте ошибку, неточности, баг и т.д. ... ....... |
5. Статьи можно расшарить в соцсетях, нажав на иконку сети:
|