Lexmark MC2640 Printer Languages and Interfaces Technical Reference - Page 9

Command parameters, Linking commands, s16.66H

Page 9 highlights

Printer Control Language (PCL) emulation 9 Element C Description Termination character from ASCII table (ranging from 64 to 94 decimal). Command parameters A command parameter sets the value for a command. This value stays constant until either a different value resets the command or a command resets the printer to the default values. For example, after the printer receives a command that selects a right margin beginning at column 63, the right margin of each printed page begins at column 63. That margin stays constant until a right margin command with a different value resets it or until the printer is reset. To determine the value of a decimal or hex: 1 Locate the value of the parameter you require in the Symbol Set Table. The decimal value is the value shown in the bottom of the cell or box with that parameter. To find a hex value, go straight up the grid from the wanted parameter and read the value in the top heading. This is the first character of the hex value. 2 Go straight across the grid to the left of the parameter and read the value in the left column heading. This is the second character of the hex value. For example, ESC (←) is coded 1B in Hex and 27 in decimal. (Any one of the three values ←, 1B, or 27 might be used in your application. Read your documentation to determine which to use.) The example on the following page sets the pitch of the primary font to 16.66 characters per inch. Example: ESC(s16.66H • Decimal: 27 40 115 49 54 46 54 54 72 • Hex: 1B 28 73 31 36 2E 36 36 48 Use the plus symbol (+) or the minus symbol (-) to select a position relative to the current cursor position. For example: ESC&a6C-Move to horizontal cursor position, column six ESC&a+6C-Move six columns to the right of the current position ESC&a-6C-Move six columns to the left of the current position Linking commands You can combine PCL emulation commands by linking them if the first 3 bytes of the commands are identical. The combined form sends the first 3 bytes only once in the string. Follow these guidelines to combine commands: • Use the first 3 bytes (characters) of the command only once at the start of the command string. • Lowercase the last letter of each command in the string. • Capitalize the last letter of the string. For example, notice that the first 3 bytes of these two commands are the same: ESC(s10H-Select 10 characters per inch ESC(s4099T-Select Courier typeface To combine these two commands, use ESC(s10h4099T which is 3 bytes shorter than the long form ESC(s10HESC(s4099T.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148

Element
Description
C
Termination character from ASCII table (ranging from 64 to 94 decimal).
Command parameters
A command parameter sets the value for a command. This value stays constant until either a different value
resets the command or a command resets the printer to the default values. For example, after the printer
receives a command that selects a right margin beginning at column 63, the right margin of each printed page
begins at column 63. That margin stays constant until a right margin command with a different value resets it
or until the printer is reset.
To determine the value of a decimal or hex:
1
Locate the value of the parameter you require in the Symbol Set Table. The decimal value is the value shown
in the bottom of the cell or box with that parameter. To find a hex value, go straight up the grid from the
wanted parameter and read the value in the top heading. This is the first character of the hex value.
2
Go straight across the grid to the left of the parameter and read the value in the left column heading. This
is the second character of the hex value.
For example,
ESC
(←) is coded 1B in Hex and 27 in decimal. (Any one of the three values ←, 1B, or 27 might be
used in your application. Read your documentation to determine which to use.) The example on the following
page sets the pitch of the primary font to 16.66 characters per inch.
Example:
ESC
(s16.66H
Decimal:
27 40 115 49 54 46 54 54 72
Hex:
1B 28 73 31 36 2E 36 36 48
Use the plus symbol (+) or the minus symbol (-) to select a position relative to the current cursor position. For
example:
ESC
&a6C
—Move to horizontal cursor position, column six
ESC
&a+6C
—Move six columns to the right of the current position
ESC
&a-6C
—Move six columns to the left of the current position
Linking commands
You can combine PCL emulation commands by linking them if the first 3 bytes of the commands are identical.
The combined form sends the first 3 bytes only once in the string.
Follow these guidelines to combine commands:
Use the first 3 bytes (characters) of the command only once at the start of the command string.
Lowercase the last letter of each command in the string.
Capitalize the last letter of the string.
For example, notice that the first 3 bytes of these two commands are the same:
ESC
(s10H
—Select 10 characters per inch
ESC
(s4099T
—Select Courier typeface
To combine these two commands, use
ESC
(s10h4099T
which is 3 bytes shorter than the long form
ESC
(s10H
ESC
(s4099T
.
Printer Control Language (PCL) emulation
9