Replace characters

E4 Replaces up to 15 characters in the output message, without moving the cursor.  Replacement continues until the E5 command is encountered. You must enter character pairs in the "Characters" text box. The first character is the character to be replaced followed by the character to replace with. You can enter up to 15 character pairs. For example: To replace the letter A with an X and replace the letter B with a Y, the Characters text box would contain AXBY.  Syntax = E4nnxx1xx2yy1yy2...zz1zz2 where nn is the total count of the number of characters in the list (characters to be replaced plus replacement characters); xx1 defines characters to be replaced and xx2 defines replacement characters, continuing through zz1 and zz2.

E4 Example:  Replace zeroes with CRs in bar code data

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 is the “Replace characters” command

02 is the total count of characters to be replaced, plus the replacement characters (0 is replaced by CR, so total characters = 2)

30 is the hex value for 0

0D is the hex value for a CR (the character that will replace the 0)

F1 is the “Send all characters” command

0D is the hex value for a CR

The data is output as:  1234

5678

ABC

<CR>

Stop replacing characters

E5 Terminates character replacement.  Syntax = E5.

Compare characters

FE 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.

Compare String

B2  Compare the string in the input message to the string "s."  If the strings are equal, move the cursor forward past the end of the string.  Syntax = B2nnnnS where nnnn is the string length (up to 9999), and S consists of the ASCII hex value of each character in the match string.  For example, B2000454657374 will compare the string at the current cursor position with the 4-character string "Test."

Check for a Number

EC  Check to make sure there is an ASCII number a the current cursor position.  The format is aborted if the character is not numeric.

EC Example:  Only output the data if the bar code begins with a number

If you will only accept data from bar codes that begin with a number, you can use EC to check for the number.

Command string:  ECF10D

EC is the “Check for a number” command

F1 is the “Send all characters” command

0D is the hex value for a CR

If this bar code is read,

the format fails. 

If this bar code is read:

the data is output as:  1234AB

<CR>

Check for non-numeric character

ED Check to make sure there is a non-numeric ASCII character at the current cursor position.  The format is aborted if the character is numeric.

ED Example:  Only output the data if the bar code begins with a letter

If you will only accept data from bar codes that begin with a letter, you can use ED to check for the number.

Command string:  EDF10D

ED is the “Check for a non-numeric character” command

F1 is the “Send all characters” command

0D is the hex value for a CR

If this bar code is read,

the format fails.  

If this bar code is read:

the data is output as:  AB1234

<CR>

Insert a delay

EF Inserts a delay of up to 49,995 milliseconds (in multiples of 5), starting from the current cursor position. Syntax = EFnnnn where nnnn stands for the delay in 5ms increments, up to 9999.  This command can only be used with keyboard emulation.

Discard Data

B8 Discards types of data.  For example, you may want to discard Code 128 bar codes that begin with the letter A.  Enter FE41B8 to compare and discard Code 128 bar codes that begin with the letter A.  Syntax = B8.  

The B8 command must be entered after all other commands.   

In the main Data Formatter Control window, you must select Required in order for the B8 command to work.  If Data Format is On, but Not Required, bar code data that meets the B8 format is scanned and output as usual.

Other data format settings impact the B8 command.  If the Data Format Non-Match Error Tone is On, the scanner emits an error tone.  If the Data Format Non-Match Error Tone is Off, the code is disabled for reading and no tone is sounded.