Cobas e 411 Machine Not Scanning Tryton-Generated Barcode

Hello everyone,

I’m facing a barcode compatibility issue with the Cobas e 411 analyzer. The barcode generated from Tryton is not being detected by the Cobas machine. However, the same analyzer perfectly reads barcodes generated from another software, so the issue seems to be with how the barcode is being generated/formatted in Tryton.

Below is the code currently used in my model to generate the barcode:

import barcode
from barcode.writer import SVGWriter

bar = fields.Function(fields.Binary(‘Bar Code39’), ‘make_barcode’)

    def make_barcode(self, name):

        labtest_id = self.name or ''



CODE39 = barcode.get_barcode_class('code128')

code39 = CODE39(labtest_id, writer=SVGWriter())

options = dict(font_size=10, module_height=15, module_width=0.20, quiet_zone=3, text_distance=1, format='BMP', dpi=400, center_text=True, write_text=False)

holder = io.BytesIO()

code39.write(holder, options)

code39_png = holder.getvalue()

holder.close()

return bytearray(code39_png)    
  1. The barcode is generated correctly and visible in Tryton reports.

  2. The same Cobas e 411 device successfully scans barcodes printed from other software systems, so the hardware is fine.
    3. i have also share the snap of fodt img setting..

Thanks

Why do not you use the code39 as the name suggest?

because our machine supports code128

@ced @pokoli yours help needed!

A possible issue is the (print) resolution of the image. Sometimes having fuzzy grey border prevents correct scanning.

i think there is no issue in print resolution, because from the same printer we prints the other barcodes for other machines, which reads the barcode correctly, but the issue comes with the cobas e 411 machine, however the same cobas machine correctly scanning the barcode of another software. so i think we have increase barcode scanning efficiency, but how? you can also see the barcode snap

From what I see the resolution is not so great and the lines are blurred.

so what would be right solution?

Another option you can try is to install LibreBarcode and use that font on the LibreOffice report over the record.name you want to display as barcode.

I tested with my phone (which is not at all a fancy phone with a top notch camera) and this application:

And it worked with your image. I guess the issue is in the scanner.

if the problem is in the scanner, then why it scans the barcode of another software correctly?

With this kind of reasoning I could easily say:

If the problem is in the barcode, then why is it scanned by some other hardware?

I don’t know why your scanner doesn’t work with this code bar. All I know is that is works in our environment. And when I test your code bar it also works.

The barcode reads fine, even from the screen, with a smartphone app.

There are 3 “types” of Code-128 barcodes, “A”, “B”, and “C”, which are used for different character sets.

The Barcode from your Screenshot is a “Type C” Barcode, which can express digits only, where two digits are kind of compressed to one character, which makes the code short.

Can you post a barcode which is printed from the other software, and which your reader is able to read?

Is there maybe a fine graned configuration option in your device, where you can limit Code-128 Barcode reading to Type A, B, or C?

this is the other software barcode which scans correctly,

Ok, this is also a “Type C” Code-128, so my assumption about disabled Type-C scanning was wrong.

Both codes, as far as I understand, are valid and readable.

The raw values of the first, non-functional code, are:

105 10 37 26 61 106

105 is the “Start Type-C” code

103726 is your code

61 is the checksum which is correct (1x10 + 2x37 + 3x26 + 105) mod 103 = 61

106 is the End code

The raw values of second, functional code, are:

105 41 35 94 86 106

413594 is your code, checksum 86 is correct.

Do you have the possibility to generate a barcode with the other software that represents the number “103726” which does not work when printed with Tryton?

Or is it possible to generate the number “413594” with your Tryton instance?

So that we can directly compare these two printouts. Sorry, I have no other idea, the code generated from Tryton seems really correct to me.

I think it is the camera hardware in the machine which hasn’t the quality of a smartphone camera. The contrast between the lines should be really hard, so no blurry lines. To test the barcode you can try:

  1. directly save the barcode to disk as a image, not in a template. Then add the barcode by hand into a text document, print it and try to scan it. Make sure the barcode has the actual size you exported it.
  2. try different export formats, the best is SVG or EPS or any other vector format which you can scale without any loss of quality
  3. use a different barcode library. I myself use Treepoem but that’s because I need 2D-matrix barcodes.
  4. Print a barcode with exactly the same code from Tryton as well as from the other software and lay them side by side and check the lines. This way you can tell if the lines kind of matches and your have the same amount of lines.