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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EAN-128 Application Identifiers 4

Status
Not open for further replies.

ruby610

Programmer
Mar 17, 2004
5
US
We receive and send out product each day that has one(1)EAN128 barcode with many different pieces of information, each preceded by an application identifier. But when these barcodes are scanned, it is just a string of numbers.

I understand what application identifiers DO and which AIs mean what - but I do not understand how I can know which numbers in the barcode ARE application identifiers when I am scanning a barcode and trying to decode it to put the information into the right fields of my database.

I have visited just about every website out there - and they have plenty of info about the purpose of AIs - but nothing about decoding them as more than just a string of numbers.

Can someone please help?
 
Put a example of one of those numbers here


DougP, MCP, A+
 
okay - the barcode (human readable form) should look like this: (The AIs are in parentheses for this posting but when scanned, obviously, it is just one long string of numbers.)

(01)90051701007193(3202)001454(15)040525(21)407100100064

oh hey - and I should also mention that the pieces of information that make up the barcode are not always in the same spots in the barcode. It varies depending on which company packs the product. Else I could just tell my program to parse it out based on the location of the characters in the string, ya know?

thanks!

 
you need to enter a function control character (fcn1)into your barcode string before it is sent to the printer, the implementation of this is dependant upon the method of printing, ie printer command language. AN example of this for ZPL Zebra Printer language is

Print #1, "^FO80,133^BY2,3,165^BCN,,N,N,N,N^FD>;>801" & Trim$(sEanNo) & Trim$(msvarPG) & icheckDigit & "10" & ">6" & sAlphaNo & ">5" & sPLC & ">8" & "240" & Trim$(lblMaterialNo.Caption) & "^FS"

this string ">8" identifies the fnc1 character.

In the above command the first AI is variable length so you can program for it. The next AI (10) is variable length hence the fnc1 character being inserted.


Hope this helps
 
Well - that is helpful in creating the barcodes - but my problem is more trying to read the ones that come in from other companies. I have no idea how they are creating or printing them - but these are large companies that I would think would be following these guidelines.

From everything I have read, it seems that the functions have to be manually programmed into a barcode to designate when the AI is coming up. When the scanners read these barcodes, though, it isn't reading any function type symbols - just a string of numbers.

Could this be my scanners aren't recognizing the functions? They recognize when I test it on barcodes I have created with func1 in them - or is there something else I don't know about that would let me know when the AI is coming up?
 
Not all scanners support displaying the AI's included in the barcode. Check your scanner software to see if there is a reference to aplication Identifiers. I am a developer and recently had to create a number of EAN 128 barcodes using an ocx and different printer programming languages. In order to check that my barcodes are correct i had to purchase a scanner that will relay the information (AI's) to notepad. My scanner uses printed barcodes which I scan to program the scanner itself.
 
Hi, from New Zealand.

I have written code that does what you are looking to do. You need to study the structure of the EAN128 rules and then use that structure to drive your code.
Each AI is two,three. or four characters long - therefore the first numbers you read is an AI (and the first number of the AI dictates the length of the AI). Each AI points to a data specification that states that the data following the AI is either fixed or variable length, or Decimal and number of decimal places etc. Variable length data has a stop character.
In other words, you need to have a table of the EAN128 AI specifications so that you can evaluate how to process the EAN128 code.
It didn't take too long to work out, and now we have an excellent tool for evaluating any EAN128 scanned data

Blinder

 
Thanks, Blinder! and hi back to you, from Texas.

I had actually just talked with someone about this idea this week - I hadn't thought about writing the code to count the fixed length after each AI - my thoughts were more "what if there is more than one variable length piece of information." I was told that it is not customary to create an EAN128 barcode with two variable length fields. Therefore, just knowing the AIs and the meanings and fixed lengths is all I needed without my barcode reader picking up on each AI. Who knew?!

I appreciate your advice - it's exactly what I was looking for.
Thanks!
 
I have similar question as ruby610.

Maybe Binder, ruby610 or someone else can provide more info on the AI (application identifiers). We also have vendors that will label the products and on our side we have to decode them.

1. I understand that there are AI’s. But how will the application know if the AI is 2,3 or 4 char long?

2. From what I read, some AI’s are followed by data that may be variable length. Is that usually the last data in the barcode string? I’m asking because if it’s not the last data in the string, then how will the application know where to find the following AI?

3. Does anyone have a link to technical specs for UCC/EAN 128?

Thank you all.
 
In reply to PeterK04, Variable length AI's are normally encoded with a special character after the end of the variable data and before the next AI, known as a FNC1 character. For fixed length AI's your software can use a table of AI's to determine whatr length follows. Barcode readers can be set up to to return these characters to your software. As for a complete list of AIs just do a search of EAN 128 on Google.
 
I read following about FNC1:
- The Function 1 Character (FNC1) may validly occur as the Symbol Check Character.
- FNC1 in the third or subsequent character position is transmitted as the ASCII character 29 (GS).
In the above statement, does that mean that the FNC1 character in human readable data string will show as 29? Or can this be programmed into the scanner?

Also, when parsing the scanned data string and pulling out the AI for processing (eg, 01, 10, 3100); How do you know if the AI will be 2,3 or 4 char long? Is there an easy way of knowing it without doing comparison checks against an AI table or something?
- Barcode human readable example as listed by ruby610:
(01)90051701007193(3202)001454(15)040525(21)407100100064
How can the application tell that the second AI is 3202 and not 32 or 320?

Than you all. This thread has been very helpful.
 
From what I can tell AI's appear to be organised so that each is unique in its sequence, so 3202 can not be read as 3 or 32 or 320. The AI 320y for eaxample is a weight unit and is always 6 chars long. The y donates the location of the decimal point within the 6 chars. A lookup table should do the trick.
 
EAN 128 bar codes are an extension of the Code128 bar codes. To this end, the scanner not only has to read code128 bar codes but also interpret the basic parts of the EAN extensions to the bar code and transmit the appropriate ascii codes to the application.

The specification for the human readable content of the bar code is not a direct translation of the characters contained in the bar code.

A Code128 bar code is an EAN bar code if the FNC1 character is found directly after the start code (which sets the character set). This is not normally transmitted by the scanner. As per kiwiCoder and bliner, when the bar codes are created, the variable data is terminated by a FNC1 character - except for the last AI - it is not terminated. As per PeterK04, any FNC1 character found after the second position is transmitted as the ascii GS character (GS=Group Separator, DEC=29, HEX=1D, OCT=035).

In summary, the requirements to read an EAN 128 bar code are:
1. a scanner which can interpret EAN 128 bar codes
2. the list of AI's showing which have fixed length data following, an those that have variable length data (to a maximum length)
3. a program which reads the first two characters from the scanner, checks the AI table to see if it needs to get more of the AI, then if fixed length, get the appropriate number of characters, or if variable length, read until the GS character or end of the scanner string. Repeat until all AI's and data are exhausted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top