Brother HL-2170W User Manual

Page 198

Advertising
background image

CHAPTER 4 HP-GL/2 - 47

DV - Define variable text path

DV [ path [,line]] [;]

path : text printing path - horizontal or vertical, and left to right, right to left, upwards or downwards.

line: the effect of a line feed.

This command determines the printing direction for labels and the carriage return point.

Permissible values of path are 0, 1, 2 and 3. If path = 0 labels are printed horizontally and left to right -

normal printing. If path = 1 labels are printed vertically downwards - characters appear in a vertical
column. If path = 2 labels are printed horizontally and right to left - words appear backwards. If path = 3
labels are printed vertically upwards - characters appear in a vertical column, reading from bottom to top.

The value of line must be either 0 or 1. If line = 0, each time a line feed is encountered the current pen

position is moved at an angle of 90º to the path in a clockwise direction. Hence, if path = 1 the second
line of text is printed to the left of the first line. If line = 1 each time a line feed is encountered the current
pen position is moved at an angle of 90º to the path in an anticlockwise direction. Hence, if path = 2 the
second line of text is printed below the first line.

If you do not use a DV command the default text path is horizontal, left to right: line feeds will move the

pen position at 90º to the text clockwise. This is equivalent to using the command DV0,0;

If you omit both parameters the text path is horizontal, left to right.

CP - Relative character movement

CP [ spaces [,lines]] [;]

spaces ; the number of text spaces the pen position is moved.
lines ; the number of text lines the pen position is moved.

Use this command to re-position the pen. The command moves the pen the specified number of lines and

spaces corresponding to the currently selected font's pitch and line spacing. (For proportionally spaced
fonts the width of the space character is used to determine the distance moved horizontally). All movement
is relative to the current label printing direction.

spaces is the number of spaces that the pen moves. A positive value of spaces moves the pen right from the

current pen location: a negative value moves it to the left.

lines is the number of lines that the pen moves. A negative value offset moves the pen down from the

current pen location: a positive value moves it upwards.

Values for spaces and lines are clamped real numbers.

The command only moves the pen and does not draw lines, irrespective of whether the pen is currently

up or down.

On completion of the command, the previous pen status (up or down) is restored.

The height of text lines (the vertical distance that a line feed moves the pen position) is fixed for every

font. However, it can be adjusted using the ES instruction.

If you omit all parameters, the pen position moves to the carriage return point and then down one line -

hence CP; is equivalent to a carriage return followed by a line feed.

10 '-Character Plot -
20 WIDTH "LPT1:", 255
30 LPRINT CHR$(27); "E";
40 LPRINT CHR$(27); "%0B";
50 LPRINT "IN;SP1;";
60 LPRINT "PA1000,5000;";
70 LPRINT "PD;PR2000,0;PU;";
80 LPRINT "CP-15,1;";
90 LPRINT "LBAbove the line"; CHR$(3);
100 LPRINT "CP-14,-2;";
110 LPRINT "LBBelow the line"; CHR$(3);
120 LPRINT CHR$(27); "%0A";
130 LPRINT CHR$(27); "E";
140 END

<Sample 55>

Advertising