95
5. DATA FORMATTING
If the bar code has characters that the host application does not want included,
you can use the E4 command to replace those characters with something else.
In this example, you will replace the zeroes in the bar code above with carriage
returns.
Command string: E402300DF10D
E4
02
0D
“Replace characters” command
Total count of characters to be replaced, plus the replacement characters
(0 is replaced by CR, so total characters = 2)
Hex value for 0
Hex value for a CR (the character that will replace the 0)
“Send all characters” command
Hex value for a CR
The data is output as:
1234
5678
ABC
<CR>
E5—Stop replacing characters
Terminates character replacement. Syntax = E5
FE—Compare characters
Compare the character in the current cursor position to the character “xx.” If
characters are equal, move the cursor forward one position. Syntax = FExx
where xx stands for the comparison character’s hex value for its ASCII code.
Refer to the ASCII Conversion Chart (Code Page 1252), for decimal, hex and
character codes.
EC—Check for a number
Check to make sure there is an ASCII number at the current cursor position.
The format is aborted if the character is not numeric. Example: Only output the
data if the bar code begins with a number If you want only data from bar codes
that begin with a number, you can use EC to check for the number.
Command string: ECF10D
FC
F1