
Appendix G
Code 128 Subset B: Includes all of the standard uppercase alphanumeric keyboard characters plus the lowercase alphabetic and special characters. To select Code 128 Subset B, place an ASCII B (DEC 66, HEX 42) before the data to be encoded. If no start character is sent for the 128 font, Code 128 Subset B will be selected by default.
Code 128 Subset C: Includes the set of 100 digit pairs from 00 through 99 inclusive, as well as special characters. Code 128 Subset C is used for double density encoding of numeric data. To select Code 128 Subset C, place an ASCII C (DEC 67, HEX 43) before the data to be encoded. Subset C can only encode an even number of numeric characters. When the data to be encoded includes an odd number of numeric characters, the last character causes the printer to automatically generate a ‘switch to subset B’ and encode the last character appropriately in subset B.
Note: It is recommended that a B character be used as the first character in order to prevent an A or C from changing the subset.
Special Character Handling: Characters with an ASCII value greater than 95 are considered special characters. To access these values, a
Example: ATEST&B123 | Data Encoded: TEST<FNC2>123 |
|
| |||
|
|
|
|
|
|
|
ASCII |
| 2 CHAR | CODE A |
| CODE B | CODE C |
96 |
| &A | FNC3 |
| FNC3 | N/A |
97 |
| &B | FNC2 |
| FNC2 | N/A |
98 |
| &C | SHIFT |
| SHIFT | N/A |
99 |
| &D | CODEC |
| CODEC | N/A |
100 |
| &E | CODEB |
| FNC4 | CODEB |
101 |
| &F | FNC4 |
| CODEA | CODEA |
102 |
| &G | FNC1 |
| FNC1 | FNC1 |
Table G-1: Special Character Handling
Control Codes: Control character encoding into Code 128 Subset A by sending these control codes:
` | = | NUL |
a through z | = | 1 – 26 |
{ | = | ESC |
= | FS | |
} | = | GS |
~ | = | RS |
ASCII 127 | = | US |
The following example prints a Code 128 bar code: |
|
|
<STX>L
D11
1E000000015010001234567890<CR> 121100000000100Barcode E<CR>
E
105 |