TAB key in Code128 barcodes

十年热恋 提交于 2019-11-28 14:05:53

Generating a Code 128 containing an ASCII control character

Code 128 can be used to encode any character in the Latin-1 character set, including ASCII control characters (ordinals 0 to 31).

Here is a Code 128 barcode representing a lone HT character (ASCII value 9):

The internal encoding uses code set A and contains these code words:

[103/START-A] [73/HT] [73/check-digit] [106/STOP]

General effect of scanning barcodes containing ASCII control characters

Scanning any type of barcode containing ASCII control characters may not give the intended result due to the diverse ways that the barcode contents may be provided to the system. Each method will provide different ways to configure how control codes are presented to your application.

A hardware reader might be configured in "keyboard wedge" mode where the device emulates a physical keyboard by generating keyboard scan codes. In this case you can usually configure the device to provide specific "key sequences" before and after scanning, as well as provide a mapping from the Latin-1 ordinals (0-255) represented in a barcode to the physical scan codes read by the keyboard interface, For example, in a particular application one might choose to map Carriage Return (ASCII 13) to the Down Arrow (5000) scan code. This text describes the relationship between ASCII control characters and scan codes.

Alternatively a hardware or software reader may use a driver. There is a lot of variation with this approach but often they provide a synthetic RS232 interface (perhaps over USB) or hook into the OLE subsystem of the operating system. In the most basic case scanning a barcode would be equivalent to pasting some text into a textfield – you may require the device/software to perform some kind of translation of the raw barcode data and you may also need to modify the application to react appropriately to the input.

Consider for example that the result of pasting some text containing a TAB character into a text field isn't necessarily the same as actually typing that sane text on the keyboard, i.e. at some point actually pressing the TAB key. When pasting the text the result would likely be that a single field would contain the full text including the TAB character. When typing the text the result would likely be that the leading input does into the initial field, but it is then split at the TAB with the remainder occupying the next field in the TAB-order.

A barcode reader's documentation should describe the interfaces available and methods for customising the presentation of scanned data.

@terry-burton - You gave an excellent response for the answer. Your write up provided me direction to where I needed to look for my answer. To solve my problem, and possibly to answer @nir-tzezana question, I found my answer in the scanner's documentation.

Correct barcode - I first ensured that my code128 was properly formatted and included the ASCII code for 'tab'. In my situation I have a number of tabs set inside a large string so I can quickly scan one barcode code and have multiple cells in excel populated.

Enable Function Key Mapping - Our environment uses Symbol LS2208 scanners. I obtained this manual and printed manual the page 7-14. In particular, I needed to enable 'Enable Function Key Mapping' on the device. If you refer to the table found on page 7-15 you'll see that the 'tab' key can be overused depending on the scanner setting. By making this change my scanner can now successfully parse the following string into correct cells.

Example:

MyCode128Function(Text123&Chr(9)&Text456&Chr(9)&Test789)

I am having the same issue.. try to open notepad make your text example:

1 (press tab) 1 (press tab)(press tab)1

then select copy and paste. into your label software . format 128auto

it works fine.

Please try use ^K for horizontal tab. Hope it should work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!