Chapter 8: Horizontal Control Commands70
Parameter m
Parameter m sets the right margin and can be any value from 0 to 255.
Note: Be sure to specify a right margin that is at least one more than the left margin. The only
time you should use a value of 0 for the right margin is if you don't want to change the
value for the right margin when you are changing the value for the left margin.
The default settings for the right margin are specified in the table below.
Table 44: IBM ESC X Command —
Default Settings for Right Margin
Pitch Narrow Carriage Models Wide Carriage Models
10 cpi/proportional 80 136
12 cpi 96 163
15 cpi 120 204
17.1 cpi 137 233
20 cpi 160 255
Left and Right Margin Commands (Epson)
⻬ ML320 E/I, ML321 E/I ⻬ ML320 Turbo, ML321 Turbo ⻬ ML520, ML521
⻬ ML390 Turbo, ML391 Turbo ⻬ ML590, ML591
Function ASCII Dec Hex
Set Left Margin ESC l n 27 108 n 1B 6C n
Set Right Margin ESC Q n 27 81 n 1B 51 n
These commands set the margins by character columns. The actual position of the margin
depends on the current pitch: a margin of 10 columns will come out as one inch in 10 cpi and
one-half inch in 20 cpi. If the current pitch is proportional, the margin is set as though it were
10 cpi. However, once you've set a margin, its absolute position remains the same, even if you
change the pitch, until you specifically reset the margin. This saves you the work of adjusting
margins with every pitch change in your document.
Sending the left margin command will cancel any horizontal tab stops you may have set,
returning the printer to its default setting (tab stops every eight columns).
You should always send margin commands at the beginning of a line.