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.