Epson ESC printer command

ESC 0x28
SubCode 0x55
Bytecount 0x05

ESC ( U

Set the printer basic units of measurement.

This command is used to set various global units of measurement that the printer can refer to with subsequent commands. Measurements are based on the Imperial system and are in fractions of an inch.

Format

ESC 0x28 0x55 05 00 PU VU HU BU(2)

PU = Page Units expressed in base units

VU = Vertical Units expressed in base units

VU = Horizontal Units expressed in base units

BU = base units (note little endian) expressed in 1/nth of an inch/

Example

ESC 28 55 05 00 04 04 04 A0 05

Subcode 0x55

Bytecount 0x0500 = 0x0005 = 5 dec

PU 0x04 = 4 dec Base units = 1/360th inch/2.77mil/0.07mm

VU 0x04 = 4 dec Base units = 1/360th inch/2.77mil/0.07mm

HU 0x04 = 4 dec Base units = 1/360th inch/2.77mil/0.07mm

BU 0xA0 05 = 0x05A0 = 1440 dec = 1/1440th of an inch/0.694mil/0.0176mm

In this example the vertical and horizontal units are the same representing 360dpi x 360dpi

Related Commands

ESC 0x28 0x43 ESC 0x28 0x63 ESC 0x28 0x63 ESC 0x28 0x53

ESC 0x28 0x76 ESC 0x28 0x56 ESC 0x28 0x2F ESC 0x28 0x5C

Notes:

There is another variant of this command with a byte count of 1.

Some older commands don't refer to these global measurement units.