ABLE AP1200 Manual

The Experts in Small Printer Solutions
Programmer Guide
Also covers the ATB102, ATB1200 and Ap863
Ap1200
Thermal Printer
Able Systems Limited Denton Drive, Northwich, Cheshire CW9 7TU England
Tel: +44 (0) 1606 48621 Fax: +44 (0) 1606 44903 Web: www.able-systems.com

Ref: "ProgGuide1_7.docx" Page 2 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Contents
1INTRODUCTION.................................................................................................3
Notes on Printer Firmware Revisions (Including Flash)..............................................................3
Copyright Notice and Disclaimer...............................................................................................4
2MODES OF OPERATION...................................................................................5
Paper Feed Button....................................................................................................................5
Printing Method.........................................................................................................................5
Built-In Fonts.............................................................................................................................6
User Font..................................................................................................................................6
Multiple Code Page Fonts.........................................................................................................6
Dot Addressable Graphics ........................................................................................................6
Serial Interface..........................................................................................................................8
Data Buffer and Flow Control....................................................................................................8
IRDA and Bluetooth Wireless Interfaces....................................................................................8
(Ap1300-IR, Ap1300-BT and Ap1300-BTi only).........................................................................8
Paper Out, Paper Low and Head Up Sensors ...........................................................................9
3CONTROL CODE TABLES..............................................................................10
Command Description Format................................................................................................. 10
Command Codes Received.....................................................................................................11
Formatting Commands (Continued)......................................................................................... 14
Barcode Commands............................................................................................................... 17
Cutter Control Commands (ATB102 driving M-T102A Only).................................................... 17
Mark Sense Operation............................................................................................................17
Reserved Commands............................................................................................................. 18
Codes Transmitted.................................................................................................................. 19
4SETTINGS AND CONFIGURATION................................................................20
Setting Configuration Information............................................................................................ 20
Saving Configuration Information............................................................................................ 22
Querying Configuration Information......................................................................................... 24
5COMMAND SUMMARIES................................................................................25
Summary of Print Format Commands and Volatile Settings..................................................... 25
Summary of Real Time Status Information.............................................................................. 25
Summary Of Non-Volatile Settings.......................................................................................... 26
1

Ref: "ProgGuide1_7.docx" Page 3 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Introduction
This Programmers Guide provides a description of the software commands supported by the:
Ap1300 and Ap1310 Battery Operated Portable Packaged Printers
Ap1310DP and Ap1310DC Direct Power Packaged Printers
Ap863-F Packaged Printer with various power options,
Ap1200 Panel Mounting Packaged Printer
It also contains some specific information relating to the:
ATB102 OEM Printer interface for the EPSON M-T102 (& M-T102A)
ATB1200 OEM Printer interface for the APS ELM205 mechanism
The firmware in all these products is largely compatible across the range, and also with earlier
versions of printers (e.g.: Ap824, Ap842, Ap824-B, Ap842-B, Ap860-B, Ap862-B, Ap863).
A User Guide, which contains connection data and details of operation, is available for each product
and should be read in conjunction with this document. Please see individual User Guides for more
specific details of each product.
Throughout this Programmers Guide the term "Printer" should be taken to refer to all products
where no distinction is necessary from the point of view of the system programmer.
If individual products differ in some important aspect, then this is noted.
A wide range of software commands are supported, allowing control of printing format (e.g. width,
height and spacing of text, underlining, text orientation etc.), as well as selection of modes of
operation (e.g. support for rechargeable battery packs and sleep options, Serial Comms settings,
Paper Out, Paper Low and Head Up indications and actions etc).
Many of the software commands are emulations of the EPSON TM-Series ESCPOS codes. Since
the implementation of ESCPOS varies from one EPSON printer to another, there is no universal
standard. The command set for these products has primarily been based on that of the EPSON TM-T
Series of thermal printers. Please refer to the acknowledgement and disclaimer.
Notes on Printer Firmware Revisions (Including Flash)
Able Systems reserves the right to modify and improve the firmware in its products at any time.
Whilst every effort is made to ensure backward compatibility, no guarantee in this respect is given or
implied.
These products include a flash re-programmable microcontroller (excluding the ATB102). This allows
firmware upgrades under customer control. A Flash Programming Utility is available to aid the user in
re-flashing printers.
Also available is a Font Editor Utility, which allows the user to design and use bespoke fonts as
required. User created or modified fonts may be flashed into the printer using the same Flash
Programming Utility.
Refer to the factory for more information on these features.
On battery operated printers, some host-selectable features may be retained during sleep mode by
saving them to non-volatile memory (FLASH). The user must ensure that any changes to the printer's
internal parameters are saved to flash memory, either manually or by timed auto-save. Refer to
section 5.2 SAVING CONFIGURATION INFORMATION for more details.

Ref: "ProgGuide1_7.docx" Page 4 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Copyright Notice and Disclaimer
Copyright subsists in all Able Systems intellectual property, including controller firmware (embedded
software) and circuit diagrams, pin connection lists and application data. No warranty in respect of
patent rights of Able Systems Limited or of third parties is given. Unauthorised reproduction or
amendment of controller firmware may result in prosecution.
Able Systems does not assume responsibility for interchangeable functionality of other parties'
command sets.

Ref: "ProgGuide1_7.docx" Page 5 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
2 Modes Of Operation
Please refer to the User Guide for an overview of the modes of operation, including waking, sleeping,
idle mode and spool mode (where applicable).
Some of the host-selectable features may be retained during sleep mode by storage in non-volatile
memory (FLASH), but the others are lost. This is clearly shown in the individual command
descriptions below. The user must ensure that any changes to the printer’s internal parameters are
saved to non-volatile memory (FLASH), either manually or by timed auto-save.
Operational status is indicated by factory-programmable colour combinations on the front-panel LED.
These can indicate charger/battery status, buffer mode, paper status and so on. Refer to the User
Guide for details.
Paper Feed Button
No external power switch is fitted, so additional functions have been assigned to the paper feed
button.
A single press and release of the button:
- in idle or spooling mode, advances paper, also prints any partial line data from the buffer;
- in sleep mode, wakes up the printer into idle mode (Ap1300, Ap1310 and Ap863-F only).
"Double-clicking" the button:
- in idle mode, prints a demo/test message including the firmware version, encoded calibration
data, and optionally the full character set and sample bar codes;
- in spooling mode, prints any stored data and enters idle mode.
Double-clicking means pressing and releasing twice in quick succession, in a similar manner to a PC
mouse.
Some functions of the paper feed button can be invoked or disabled by the host. The button is also
disabled for 0.25 seconds after each data byte is received, to prevent the user from prematurely
printing partial lines (Data from the host will generally be continuous).
Printing Method
Each printer mechanism has 384 horizontally-arranged elements, printing a single dot line across the
full width of the paper at once. The paper is advanced past the print head by a rubber platen driven
by a stepper motor. Typical print speed is 50 mm/s at a battery voltage of 6 Volts. Each printed dot is
nominally 0.125 mm square. The paper may only be fed through the printer in the forward direction.
It is not possible to print partial lines in isolation: if such a line remains in the buffer, it will not be
printed until flushed out by: a line terminator; some following data; a programmable timeout; or by the
user pressing the paper feed button, if enabled. Once a partial line has been flushed out, it may not
be extended. Any following data will be printed on the next line.
Character lines may be printed in single or double width, single or double height, and underlined.
These three text mode attributes may be combined at will. If single and double height characters are
mixed in a line, the bottom of the characters will be aligned.

Ref: "ProgGuide1_7.docx" Page 6 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Built-In Fonts
The built-in font characters are formed according to the Font Mode:
Font
Mode
Chars/Line
Character Height
Row Height
Printer Model
0 32 24 dots (3.00 mm)
30 dots (3.75 mm) All
1 42 24 dots (3.00 mm)
30 dots (3.75 mm) All
2 24 24 dots (3.00 mm)
30 dots (3.75 mm) All
3 32 24 dots (3.00 mm)
24 dots (3.00 mm) All
Font Mode 0 is the default factory setting. Character heights refer to the maximum spans of capital
letters and descenders. Row heights refer to the interval from the top of one character row to the top
of the next, including inter-row spacing. The row height may be adjusted if required.
In all the built-in Font Modes, the character set is the standard IBM®character set (also known as
Code Page 437) which includes graphics box-drawing characters. These box-drawing characters are
extended to link up in both axes where appropriate. This character set has been modified (except in
the ATB102) to include the Euro symbol (‘€’) at position 80H (128 Decimal), in place of the usual
capital C with cedilla (‘Ç’). Also, certain special character substitutions are possible for particular
applications (e.g.:- switching the ‘£’ and ‘#’ characters, or including the Nordic 'ø' & 'Ø' characters in
place of the ‘¢' & '¥' characters). Printers running firmware V8.3 or higher also support Code Page
1252 which is the default character set for the Ap1300-BTi. See the section on SETTING
CONFIGURATION INFORMATION for details.
The Font Mode is normally stored in non-volatile memory (FLASH). This means that the printer can be
pre-configured to operate in 24, 32 or 42 Char/Line modes as applicable.
If required, Font Mode changes may be disabled. See the section on SETTING CONFIGURATION
INFORMATION for details.
User Font
N.B. The User Font facility is not available for the ATB102.
This mode gives access to a single User Font programmed into the printer’s non-volatile memory
using the Flash Programming Utility. The format of the characters in the User Font is defined within
the font itself.
When a User Font is present, the Built-In Fonts, and any character substitutions, are disabled. If the
User Font is subsequently removed, then the Built-In Fonts are re-enabled automatically.
Several fonts, covering a variety of code pages are available at www.able-systems.com
Multiple Code Page Fonts
N.B. Multiple Code Page Fonts are only available for the Ap1300 and Ap1310 printer range.
This type of User Font consists of multiple code pages resident at ASCII 0x80 to 0xFF. A simple
command can be issued to switch between these pages, providing access to multilingual character
sets.
Dot Addressable Graphics
Several protocols for dot-addressable graphics data are supported:
Eight (8) dot high graphics are aligned with the top of text characters. In these modes the dot
patterns sent by the host may be doubled-up, tripled-up or quadrupled-up, both horizontally
and vertically before printing. The dot size is nominally 0.25, 0.375 or 0.5 mm square.

Ref: "ProgGuide1_7.docx" Page 7 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Twenty-four (24) dot high graphics are also aligned with the top of text characters, and are
printed dot-for-bit as sent by the host. The nominal dot size is 0.125 mm square. Successive
blocks can be vertically contiguous only if Font Mode 3 is selected.
Single dot high graphics are also aligned with the top of text characters. Successive
horizontal dot lines can be vertically contiguous if no other printing is performed between
them.
Graphics may be combined with text printing as required. Large areas of solid dots are not
recommended, as they may cause overheating and shorten the head life: try shading. Heavy
graphics printing will also drain the battery more quickly.

Ref: "ProgGuide1_7.docx" Page 8 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Serial Interface
The default serial interface format for all printers is 9600 baud, 8 data bits, 1 or 2 stop bits, and no
parity. Other formats can be programmed into the printer at the factory or in the field, from the host.
A setup program, suitable for use with a PC, is available from Able Systems to simplify this process.
Serial data is expected on Rx in RS-232C format with -12V meaning 'mark' or logical '1', and +12V
meaning ‘space’ or logical '0', with reference to the common ground. The serial data output line, Tx,
transmits XON/XOFF and status information to the host at the same baud rate and format as the
serial data input. The hardware busy line, Busy, is true (nominally -12V) when busy.
Some host equipment use a constant space condition (+12V) to indicate a reset condition or wait
state. Some battery powered host equipment present the same output signal when they go to sleep.
By default the printer will interpret this condition as a repetitive receive error, and will print multiple ‘?’
characters to indicate the fault. If required, the printer may be set to ignore this condition.
Data Buffer and Flow Control
The printer has a nominal 20k byte buffer which enables data to be received while previous lines are
being printed. The state of the data buffer is transmitted to the host as follows:
XOFF (13HEX) sent when buffer fills to 3/4 full;
XON (11HEX) sent when buffer empties to 1/4 full; and also after a controller reset.
The hardware busy line is set when 256 bytes of space remains; and incoming data are no longer
passed to the buffer (but may be processed) when 128 bytes remain. The hardware busy line goes
ready again when 384 bytes become free. Note that the buffer can become filled with non-printable
codes, in which case the controller will go busy.
The printer always transmits an XON character when it has woken up and is ready to receive data. It
always attempts to transmit an XOFF character to the host before going to sleep. It is not necessary
to select hardware or software handshaking. Both are active at all times.
In the event of the battery becoming exhausted, the printer will automatically protect its own control
circuitry by entering sleep mode if the instantaneous battery voltage drops below a threshold (e.g.
during a particularly heavy section of print). In this event no XOFF character is transmitted.
IRDA and Bluetooth Wireless Interfaces
(Ap1300-IR, Ap1300-BT and Ap1300-BTi only)
The wireless interfaces present in the Ap1300-IR, Ap1300-BT and Ap1300-BTi are virtually
transparent emulations of a standard serial connection. In each case, complex link management
protocols are employed to ensure the integrity of the data transport and handle link making and
breaking. However, the 'payload' data required to control the printer is unaffected by the transport
mechanism.
See the User Guide for more details on the protocols and profiles supported for each.
SDK’s and demonstration software/apps are available for the following mobile platforms:
Windows CE
Blackberry
Android
iOS
Please contact the factory for more details

Ref: "ProgGuide1_7.docx" Page 9 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Paper Out, Paper Low and Head Up Sensors
The sensors present in each product are shown below:
Product
Mechanism
Paper Out
Paper Low
Head Up
Auto
-
Spool
Ap1300 FTP-628MCL103
By default
Ap1310 FTP-628MCL103
By default
Ap863-F M-T102
Selectable
Ap1200 ELM205
Selectable
ATB102 M-T102
Selectable
ATB1200 ELM205
Selectable
In all the products a reflective optical Paper Out sensor within the mechanism detects an out-of-paper
condition, and/or senses black marks to register with pre-printed forms. In the Ap863-F only, a
mechanical switch with optical sensing Paper Low indication provides a 'near-end' paper alert. In the
Ap1300, Ap1310 and the ATB102 only, a mechanical Head Up sensor detects when the lid is open.
The printer can be set to enter Spool mode automatically when the sensors become active. When
selected, Spool mode can be automatically exited, when the problem is cleared. This behaviour may
be modified. See the section on SETTING CONFIGURATION INFORMATION for details.
The state of the sensors is reported in the STATUS BYTE.

Ref: "ProgGuide1_7.docx" Page 10 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
3 Control Code Tables
General Notes: All codes from 00 to 1F which are not listed below are ignored.
An ESC, GS etc code followed by an unrecognised command is ignored, but any following
parameters are interpreted as normal characters. Any ESC, GS etc sequence which is described
below but which has an illegal parameter is abandoned at that point. The controller will attempt to
interpret subsequent characters as normal characters.
There is no need to follow ESC or GS control code strings with a line terminator. If one is added it will
be interpreted as such.
Most control codes are executed when they fall through the data buffer at printing time. Some ("real
time") codes are interpreted immediately on receipt, so that the printer can respond even if the buffer
is full.
The settings defined in some commands, identified by N, may be stored in non-volatile memory
[FLASH]. All settings are implemented as soon as they are interpreted, except for communication
settings. Newly set values for the Baud rate, parity, data and stop bit parameters are not
implemented until the printer has been cycled into sleep mode and back to waking mode.
Command Description Format
In the explanations that follow, commonly recognised labels have been used (e.g. LF, CR, FF, ESC);
command parameters are given as equivalent ASCII characters (e.g. "J"); or as hexadecimal [hex]
values (e.g. 4AH); or decimal numbers (e.g. 74 or n) which are single byte values. Dots (...) mean
more parameters follow.
The command string descriptions are punctuated by commas [,] for clarity, though most versions of
BASIC will use semi-colons [;]. However, these separators will not be transmitted by the host.
As an example, the command to select the underlined printing mode can be expressed in a number of
ways, all of which are equivalent:
ESC, "!" ,n (as in the command description)
27 , 33 ,128 (expressed as decimal character values)
1BH,21H,80H (expressed as hex values)
n is a number, such that if expressed in binary, setting its most significant bit (bit 7) will select the
underline mode.
This expression could be written into a BASIC program as:
10 PRINT#1,CHR$(27);”!Ç”; ...using ASCII characters, or as:
10 PRINT#1,CHR$(27);CHR$(33);CHR$(128); ...using decimal values, or as:
10 PRINT#1,CHR$(&H1B);CHR$(&H21);CHR$(&H80); ...which is equivalent, but using hex.

Ref: "ProgGuide1_7.docx" Page 11 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Command Codes Received
To assist programmers in converting existing host software, the following codes are used:
Fully supported as in EPSON ESCPOS
+ Altered functionality compared with ESCPOS
@ Able special code, no ESCPOS equivalent exists
N Setting may be retained in non-volatile [FLASH] memory
ESC,"L"
1BH,4CH
Enter spooling mode
+
Data and control codes received after this command will be stored in the buffer until either a
command (FF) or GS,L command to exit spooling mode is received, or the paper feed button is
double-clicked by the operator (double-click operation can be disabled by the ESC,c,5.. command).
Note that the normal sleep inactivity timeout period is extended in spooling mode.
ESC,"c","5",..
1BH,63H,35H,n
Enable/Disable button functions
+N
n is encoded so:
bit 0 clear (0) Disable paper feed button
bit 0 set (1) Enable paper feed button (default condition)
bit 1 clear (0) Disable double-click demo mode
bit 1 set (1) Enable double-click demo mode (default condition)
Other bits are ignored; the double-click demo mode only functions if the paper feed button is
enabled.
ESC,"X",..
1BH,58H,m..
eX
tended Commands (special to Able
)
@ N
See the section SETTING INTERNAL CONFIGURATION INFORMATION below for format.
ESC,"!",..
1BH,21H,n
Select printing mode
+N
The third byte n is interpreted as follows:
bit 0 } Select Font Mode 0 to 4
bit 1 } (Mode 0 is factory setting)
bit 2 } (Invalid Font Mode Values are Ignored)
bit 4 Select(1)/Cancel(0) Double height mode
bit 5 Select(1)/Cancel(0) Double width mode
bit 7 Select(1)/Cancel(0) Underlined mode
Bits 3 and 6 are ignored.
Each of these attributes remains in force until actively cancelled, or the printer enters sleep mode.
The Font Mode may be stored in non-volatile memory (FLASH) and retained through sleep mode.
Some older host equipment may require the Font Mode Select bits to be disabled; See the
ESC,"X",09H,n command for details of how to do this.
Font Modes (0 to 4) cannot be mixed within a single print line: a new line results when the Font
Mode is changed.
ESC,"R
"
, …
1BH,52
H
,n
Select Exten
ded Page
@
N
Font Format 2 and 3 are user font images containing multiple code pages. This command is used to
select one of the code pages in the image.

Ref: "ProgGuide1_7.docx" Page 12 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Graphics Commands
ESC,"*",..
1BH,2AH,m,n1,n2,d1...dk
Dot
-
Addressable (Bit) Graphics
+
Several modes of Dot Addressable Graphics are possible:
In all modes dot patterns are coded as 1= dot, 0= space, patterns are arranged in dot-columns, and
the MSBit of each byte is printed at the top. The number of dot columns is given by (n1+ 256*n2).
When the third byte, m=0 or 2 (00H or 02H): Doubled-up 8 dot graphics [ k = n1+ 256*n2 ]
Each 8-dot vertical column is encoded as a single byte. Each dot is doubled in both axes to
0.25 mm square. Successive rows of 8-dot graphics cannot be printed contiguously in the
vertical direction unless using a 16 dot high User Font.
When the third byte, m=3 (03H): Tripled-up 8 dot graphics [ k = n1+ 256*n2 ]
Each 8-dot vertical column is encoded as a single byte. Each dot is tripled in both axes to
0.375 mm square. Successive rows of 8-dot graphics can be printed contiguously in the vertical
direction only in Font Mode 3 or a User Font which is 24 dots high.
When the third byte, m=4 (04H): Quadrupled-up 8 dot graphics [ k = n1+ 256*n2 ]
Each 8-dot vertical column is encoded as a single byte. Each dot is quadrupled in both axes to
0.5 mm square. Successive rows of 8-dot graphics can be printed contiguously in the vertical
direction only in Font Modes 0, 1 or 2 or a User Font which is 32 dots high.
When the third byte, m=32 (20H): Plain 24 dot graphics [ k = 3 x (n1+ 256*n2)]
Each 24-dot vertical column is encoded as three successive bytes. Bytes d1, d4, d7 etc are at
the top of the 24-dot vertical columns. The printed graphic pattern is therefore represented by
the byte numbers as follows: d1 d4 d7 ... d(k-2)
d2 d5 d8 ... d(k-1)
d3 d6 d9 ... dk
Each dot is the mechanism dot size of 0.125 mm square. Significant features should be coded
using at least 2 dots together. Successive rows of 24-dot graphics can be printed contiguously
in the vertical direction only in Font Mode 3 or a User Font which is 24 dots high.
When the third byte, m=8 (08H): Single Dot Line graphics [ k = n1+ 256*n2 ]
Data bytes are printed horizontally in order from left to right across the page, with the Most
Significant Bit to the left. Each byte encodes 8 horizontal dots. Each dot is the mechanism dot
size of 0.125 mm square. Successive horizontal dot rows can be printed contiguously in any
Font Mode only if no other printing occurs between them.
If the print mechanism is allowed to stop between successive contiguous graphics patterns, slight
discontinuities may occur due to mechanical hysteresis. Consider using spool mode to prevent this.

Ref: "ProgGuide1_7.docx" Page 13 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Formatting Commands
ESC,"
-
"..
1BH,2DH,n
Turn underline on/off
+
If n=0: Underlining is turned off; otherwise is turned on.
ESC,"2"
1BH,32H
Set default Row Height
Set default row height. ie:-30 (0.125mm) dots in Font Mode 0,1 and 2; 24 dots in Font Mode 3; and
16 dots in Font Mode 4.
ESC,"3",..
1BH,33H,n
Set Row Height
n is the row height. Allowed range: 20 to 100. Row height refers to the interval from the top of one
character row to the top of the next, including inter-row spacing. This setting is retained until
cleared, or the Font Mode is changed or the printer enters sleep mode
ESC,"D",..
1BH,44H,d1..dk,00
Set horizontal tab positions
+
Up to 6 positions may be recorded, and replace the default settings. If more are given, the first 6
are accepted and normal processing resumes from that point. If less than 6 are given then the
command should be terminated with a NUL(00H) character. Note that tab settings take variable
character spacing into account. Setting is retained until cleared or the printer enters sleep mode.
ESC,"J",..
1BH,4AH,n
Print and feed extra paper
+
n is the count of notional 1/20th print lines to be fed. This command terminates the current line; n is
divided by 20 (remainder discarded) and the quotient used as a count of additional blank single-
height character lines.
ESC,"$",..
1BH,24H,n1,n2
Set absolute print position
+
Position = (n1 + 256*n2) dots from start of line. If printing is currently to the left of this position, blank
space is inserted up to it. If it is to the right, then over-printing can occur, allowing special character
combinations to be formed. Any overflow is cut off at end of line.
ESC,"
\
",..
1BH,5CH,n1,n2
Set relative position
Position = (n1+ 256*n2) dots from current position in text lines. Blank space is inserted up to the
selected dot position. Any overflow is cut off at end of line.
ESC,"d",..
1BH,64H,n
Print and feed n lines
Terminates the current line and feeds n blank print lines
ESC,"{",..
1BH,7B,n
Set/Cancel inve
rted character printing
n is encoded so:
bit 0 cleared (0) Normal (upright) text
bit 0 set (1) Inverted text
Normal and inverted text cannot be mixed in a single line. This setting is temporary (the default
setting can be redefined by the ESC,X command and stored in non-volatile memory [FLASH]).

Ref: "ProgGuide1_7.docx" Page 14 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Formatting Commands (Continued)
HTAB
09H
Horizontal Tab
Default positions: 8,16,24,32,40;
6 positions available; programmed using ESC,D command. Ignored if off the end of a line. The first
HTAB does not move from a HTAB position to the next:
e.g.
1234567890123456
123456 T (1 Tab before "T")
1234567T (1 Tab before "T")
1234567 T (2 Tabs before "T")
12345678 T (1 Tab before "T")
LF
0AH
Li
ne Feed
Works in an either/or way with CR: CR/LF pairs are treated as a single line terminator. Line
terminators immediately following full lines are ignored.
FF
0CH
(Real time) Form Feed
+
Exit spooling mode and print buffer contents.
Ignored if the printer is not already in spooling mode or an error condition exists.
CR
0DH
Carriage Return
@
Line terminator: works in an either/or way with LF. CR/LF pairs are treated as a single line
terminator
ESC," ",..
1BH,20H,n
Set right
-
of
-
chara
cter spacing
n is the number of additional (note!) dot spaces placed to the right of each character printed.
Default= 0; maximum value= 31. Setting is retained until cleared or the printer enters sleep mode.

Ref: "ProgGuide1_7.docx" Page 15 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Initialise and Request Status Commands
ESC,"@"
1BH,40H
Initialise printer
Clears print parameters to power-on default, ie normal width and height, no underline, no extra
space, and default tabs. Does not affect the inverted mode. Not real-time, executed in data
sequence (unlike CAN).
CAN
18H
(Real time) Abort printing and initialise
@
Same result as ESC,'@' but executed immediately when received. A line in progress is allowed to
finish, but printing then continues from data received after the CAN code. Ignored if embedded in
an ESC, GS or graphics sequence.
GS,ENQ
1DH,05H
(Real time) request for printer status
+
This command is executed and the STATUS byte is transmitted immediately on receipt, even if the
printer is busy. See the section CODES TRANSMITTED for format.
GS,"I",..
1
DH,49H,n
Request to transmit information
+
See the section QUERYING INTERNAL CONFIGURATION INFORMATION below for format.
GS,"L
",..
1DH,4C
H,n
Exit Spool Mode and Transmit confirmation data
@
If spool mode is entered by ESC, L command and this command is used to exit from spool mode,
confirmation of the number of bytes sent whilst in spool mode will be returned. The sequence on
exiting spool mode is;
(i) Transmit initial confirmation string with data packet information
(ii) Exit Spool Mode
(iii) Print all spooled data from buffer
(iv) Transmit final confirmation string
When the GS,’L’ command is received a 4 byte confirmation string is transmitted by the printer as
follows:
STX ByteCountLo ByteCountHi CheckDigit
[02h] [06h] [00h] [4Fh]
ByteCount is transmitted as two consecutive bytes such that (ByteCountLo + (ByteCountHi x 256) )
gives the actual ByteCount value. In this case, there are 6 data bytes between the ESC,’L’ and
GS,’L’ commands, and the result of a cumulative XOR of each of these 6 bytes yields 4Fh as the
CheckDigit.
The printer then exits from Spool mode and processes the data which has been held in the buffer in
the normal way. Once the data buffer is completely empty and the mechanism is no longer running
(as normally reported by bits 1 and 2 of the STATUS byte), then the packet of data is judged to
have been processed completely. At this point a further confirmation string is transmitted as follows:
ETX ByteCountLo ByteCountHi CheckDigit
[03h] [06h] [00h] [4Fh]
Note that the first byte is STX for the first string and ETX for the second string.
The final 3 bytes are identical in both strings.

Ref: "ProgGuide1_7.docx" Page 16 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Initialise and Request Status Commands (Continued)
GS,"a",..
1DH,61H,
n
Enable/Disable automatic status
+N
Defines the conditions under which the STATUS byte is transmitted without explicit request from the
host. A bit set in ‘n’ causes the STATUS to be sent whenever the corresponding bit in the STATUS
byte changes state (see CODES TRANSMITTED for format). A value of n=00H disables automatic
reporting, and is the default condition.
ESC,"u",..
1BH,75H,n
Transmit peripheral device status
+
Transmit STATUS byte when decoded. n is discarded; this command is exactly the same as ESC,v
This command is in the buffer when the response is sent, so the buffer will not be reported as
empty. See the section CODES TRANSMITTED below for format.
ESC,"v"
1BH,76H
Transmit printer status
+
Transmit STATUS byte when decoded. This command is in the buffer when the response is sent,
so the buffer will not be reported as empty. See the section CODES for format.

Ref: "ProgGuide1_7.docx" Page 17 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Barcode Commands
GS,"H",n
1DH,48H,n
Select automatic text in barcode
n is encoded so:
bit 0 cleared (0) No barcode text above barcode symbol (default)
bit 0 set (1) Print barcode text above barcode symbol
bit 1 cleared (0) No barcode text below barcode symbol (default)
bit 1 set (1) Print barcode text below barcode symbol
This setting is retained and used for all subsequent barcodes, but is cleared to the default when the
printer enters sleep mode
GS,"h",n
1DH,68H,n
Select height of barcode
+
Height of barcode = (n x 0.125mm) n is valid in the range 1 <= n <= 150.
Default value 100; a zero value is ignored; a value of 150 is used in place of values greater than
150. This setting is retained and used for all subsequent barcodes, but is cleared to the default
when the printer is powered off.
GS,"k",..
1DH,6BH,m,d1..dk,
t
Print barcode using data provided
N.B. This command must always be terminated with value “t” shown below.
The number and type of bytes of data varies with barcode type "m".
Valid m values: Terminator (t)
0: UPC-A Numeric only ASCII data: supply 11 digits 00H
1: UPC-E Numeric only ASCII data: supply 6 digits 00H
2: EAN-13 Numeric only ASCII data: supply 12 digits 00H
3: EAN-8 Numeric only ASCII data: supply 7 digits 00H
4: Code 39 Alphanumeric ASCII data: variable length (Max 22) 00H
5: Int2 of 5 Numeric only ASCII data: variable length (Max 23) 00H
6: Code 128A Alphanumeric ASCII data 0x00 to 0x5F: variable length (Max 14) FFH
7: Code 128B Alphanumeric ASCII data 0x20 to 0x7F: variable length (Max 14) FFH
8: Code 128C Numeric only ASCII data 30H to 39H: variable length (Max 14 bytes) FFH
9: Code 93 Alphanumeric ASCII data 0x00 to 0x7F: variable length (Max 16) FFH
Note that the user should verify that a given barcode will fit on the paper, especially when using the
variable length barcodes. Barcodes may not be mixed with normal text.
GS,"w",n
1DH,77H,n
Select width of barcode
Width of barcode element (narrow bar) = (n x 0.125mm)
n is valid in the range 2 <= n <= 4. Other values are ignored; Default value is 3.
This setting is retained and used for all subsequent barcodes, but is cleared to the default when the
printer enters sleep mode. Note that the user should verify that a given barcode will fit on the paper,
especially when using the variable length barcodes.
Cutter Control Commands (ATB102 driving M-T102A Only)
The ATB102 has two additional commands for control of the cutter (when driving the M-T102A only):
ESC,"i"
1BH,69H
Execute a Full Cut
Perform a full cut.
ESC,"m"
1BH,6DH
Execute a Partial Cut
Perform a partial cut.
Mark Sense Operation
Please refer to the factory for more detailed information before using the Mark Sense feature.

Ref: "ProgGuide1_7.docx" Page 18 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Reserved Commands
In general, commands which are not implemented and described above should not be sent to the
printer, as the outcome may not be as expected. However, some additional EPSON ESCPOS
commands are recognised, and an attempt is made to decode them, so that following commands will
remain in synchronism and correctly interpreted. Please refer to Able Systems in case of difficulty.

Ref: "ProgGuide1_7.docx" Page 19 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
Codes Transmitted
The printer automatically transmits XON and XOFF bytes when the buffer status changes, as follows:
XON
11H
Start transmission
Meaning: The buffer is ready to receive data.
Transmitted after a reset, or when the data buffer empties to only 1/4 full.
XOFF
13H
Stop transmission
Meaning: The buffer is not ready to receive data.
Transmitted when the data buffer becomes 3/4 full, or before a controlled entry into sleep mode.
In addition the printer can transmit a special STATUS byte, either on request, or optionally when
individual status conditions change state:
The commands ESC,"u",n and ESC,"v" request the STATUS byte be transmitted at the time that the
command is interpreted. (N.B. The buffer is never reported as empty when these commands are
used, as it contains at least this command at the time of transmission).
The command GS,ENQ requests the STATUS byte be transmitted immediately on receipt of the
command, even if the buffer contains large amounts of data yet to be interpreted and/or printed.
The GS,"a",n command specifies individual bits of the STATUS byte which should be monitored, and
result in the STATUS byte being automatically transmitted if a change of state is detected.
[STATUS]
Status Report
The STATUS byte is encoded bitwise:
bit 0 Head Up Sensor Active? [0= head OK 1= head up ]
bit 1 Mechanism running [0= stopped 1= running ]
bit 2 Data buffer completely empty? [0= not empty 1= empty ]
bit 3 Paper Out Sensor Active? [0= paper OK 1= paper out ]
bit 4 Reserved [ ]
bit 5 Spooling mode? [0= normal 1= spooling ]
bit 6 Error [0= no error 1= error present]
bit 7 Always Set [ Always 1 ]
The command GS,"I",n is also a request for information to be transmitted at the time that the
command is interpreted (i.e. not in ‘real-time’). For details of the valid values for n, and the resultant
transmitted information see the QUERYING INTERNAL CONFIGURATION INFORMATION section
below.
If an error condition exists, then the usual single STATUS byte is followed by a second error
identification byte. This second byte is only sent if bit6 of the STATUS byte is set. The values of the
error ID byte are as follows:
Value Error type
80H Mechanism Voltage (Vmech) above upper limit
7FH Mechanism Voltage (Vmech) below lower limit
40H Mechanism Head Temperature above upper limit
07H Cutter Blade stuck out - probably jammed (ATB102 only)
06H Cutter Blade stuck in or no cutter found (ATB102 only)
Other values are either not defined or represent internal controller hardware errors.
N.B.
The ATB102 and Ap1200 differ in the use of bits 0 and 3 of the STATUS
byte. These two printers report the "Paper Out" status via bit 0. The ATB102
(only) also provides for an additional "Head Up" input which is reported via
bit 3. The Ap1200 has no provision for a “Head Up” sensor.

Ref: "ProgGuide1_7.docx" Page 20 of 26
Document Revision: “1.7”
Document Date: “11 Sep. 2013”
4 Settings and Configuration
The printer maintains a large number of internal settings and configuration information which is not
derived from ESCPOS control codes, and is unique to Able Systems printers.
In general, the ESC,"X",m,... command is used to set these values, and the GS,"I",m command is
used to query them. The following table details all valid combinations of these commands:
(N.B. See the section SAVING CONFIGURATION INFORMATION).
mESC,"X",m,...
mGS,"I",m
3n1,n2 Report Firmware Version Number
4 eg
"9600,N,8,1",CR Set Baud 4 eg "
9600,N,8,1",CR Report Baud Setting
6eg "SerialNo",CR Report Unit Serial Number
9n1 Set Internal Defaults 9n1,n2,n3 Report Internal Defaults
11 n1,n2 Set Sleep Period 11 n1,n2 Report Sleep Period
15
15 n1,n2,n3 Report Voltage/Temp Data
18 n1..n18 Set LED patterns 18 n1..n18 Report LED patterns
19 n1 Set MT102FLAGS 19 n1 Report MT102FLAGS
20 n1,n2 Set MarkFeed /
EjectFeed
20 n1,n2 Report MarkFeed / EjectFeed
23 n1 Set AUXFLAGS 23 n1 Report AUXFLAGS
33 n1 Set MaxDotsAtOnce 33 n1 Report MaxDotsAtOnce
42 n1 Set EjectOffset 42 n1 Report EjectOffset
48 Save all settings to
Flash
50 n1,n2 Set Spool Sleep Period 50 n1,n2 Report Spool Sleep Period
52 n1,n2 Set Auto-Save Period 52 n1,n2 Report Auto-Save Period
66 n1 Set print darkness 66 n1 Report print darkness
110 Produce test print
Setting Configuration Information
N.B. This section contains details of how to modify some of the basic operating functions of
the printer. Do NOT attempt to modify any parameter unless you fully understand the potential
consequences.
The command ESC,"X",m,... may be used to set various internal configuration values according to
the value of m as defined below.
m=4 Select Baud rate, parity, word length and number of stop bits. (Default: "9600,N,8,1")
Command parameters must have format: e.g."19200,E,8,2", so:
4 or 5 number characters, [the required Baud rate]
1 comma character
1 "N/n/E/e/O/o" letter character, [the required Parity]
1 comma character
1 "7/8" number character, [the required Data bits]
1 comma character
1 "1/2" number character [the required Stop bits]
e.g. To select 19200,E,8,2 the following 14 byte command should be sent:
ESC,"X",04H,"19200,E,8,2"
or as hex codes: 1BH,58H,04H,31H,39H,32H,30H,30H,2CH,45H,2CH,37H,2CH,32H
The following RS232 baud rates are accepted;
1200, 2400, 4800, 9600, 38400, 57600
Each printer accepts 8 data bits followed by either 1 or 2 stop bits and can use Odd, Even or No
parity.
The setting must be saved to non-volatile memory (FLASH), and does not come into effect until after
the next sleep/waking mode transition.
m=9 Set Internal Default Values.
This manual suits for next models
3
Table of contents
Other ABLE Printer manuals
Popular Printer manuals by other brands

Samsung
Samsung CLP 610ND - Color Laser Printer Service manual

IBM
IBM InfoPrint 20 Quick reference card

Samsung
Samsung CLP-315 - CLP 315 Color Laser Printer manual

Canon
Canon PIXMA E3300 Series Getting started

Konica Minolta
Konica Minolta magicolor 7450 installation guide

Brother
Brother MFC MFC-5440CN user guide