Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help writing a barcode for CONTROL+X

Status
Not open for further replies.

jwhensley

Technical User
Jul 12, 2007
5
0
0
US
Hello,

I am trying to write a code128 barcode that is the same as pressing CONTROL+X on your keyboard. Is this possible? If it is what is the character string for it?


Thanks,

Jonathan Hensley
 
I should also say that the barcode doesn't have to be code 128. It can be any code.
 
I tried encoding that but it wouldn't read for me. In fact, my scanner will not read anything in 128A that is in lower case. Any ideas?
 
I believe so. I used a commercial program to check it.
 
Lowercase 'x' (the character with decimal code 120, or hexadecimal 78) will generate a Code128 barcode symbol which will be interpreted as one of three different characters, depending on the current selected 'subset':

Subset A --> control code 'CAN' (this is the character usually associated with decimal code 24, hexadecimal 18).

Subset B --> lowercase 'x'.

Subset C --> numeric pair '88'.

So you will need a Start character which specifies Subset A, or, if switching from a different initial subset, the appropriate switching character).

As Jim has pointed out, you will also need to calculate the correct checksum character to go before the Stop character in the encoded string.
 
This is the string I have tried:

ËxxÎ

It is code 128A, and was generated by IDAutomation.com

Is this correct? It will not scan no matter what I try.
 
I don't know about the font you are using, but...

If I create a 4 byte print string (in hex)

Code:
0xa9 0x78 0x78 0xac
  |    |    |    |
start data chk  stop 
  A        sum
It DOES scan properly to ^X as expected.


Jim Asman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top