1-48 Command Descriptions Rev. A
GS P x y
[Name] Set horizontal and vertical motion units
[Format] ASCII GS P x y
Hex 1D 50 x y
Decimal 29 80 x y
[Range] 0 ≤ x ≤ 255
0 ≤ y ≤ 255
GS P x y sets the horizontal and vertical motion units to 1/x and 1/y inches, respectively. The
horizontal and vertical motion units indicate the minimum pitch used for calculating the values of
related commands (shown below). The default values are x=180 and y=360. These values equal a
normal dot pitch in horizontal and half dot pitch in vertical. When x and y are set to 0, the default
setting of each value is used.
Commands used with the horizontal motion unit (1/x) in standard mode: ESC SP, ESC $, ESC \,
GS L, and GS W.
Commands used with the vertical motion unit (1/y ) in standard mode: ESC 3, ESC J, and GS V.
Commands used with the horizontal and vertical motion units (1/x and 1/y) in page mode (either x
or y can be used, depending on the print direction set with ESC T): ESC SP, ESC $, ESC \, ESC 3,
ESC J, ESC W, GS $, GS \, and GS V.
ESC @
[Name] Initialize printer
[Format] ASCII ESC @
Hex 1B 40
Decimal 27 64
Program Example Print Sample
PRINT #1, CHR$(&H1D);"P";CHR$(180);CHR$(180); AAAAA
PRINT #1, CHR$(&H1B);"3";CHR$(30);
←
Set line spacing
BBBBB
30/180-inch line spacing
PRINT #1, "AAAAA"; CHR$(&HA); CCCCC
PRINT #1, "BBBBB"; CHR$(&HA);
PRINT #1, CHR$(&H1D);"P";CHR$(180);CHR$(90); DDDDD
30/90-inch line spacing
PRINT #1, CHR$(&H1B);"3";CHR$(30);
←
Set line spacing
PRINT #1, "CCCCC"; CHR$(&HA); EEEEE
PRINT #1, "DDDDD"; CHR$(&HA);
PRINT #1, "EEEEE"; CHR$(&HA);